Im implementing a screenshot function and currently it just saves to the project file but it would be nice if it saved to a specific file or location such as the desktop.
Currently:
try {
imageId = random.nextInt(9999);
ImageIO.write(MainGame.image, "png" , new File("Sinecure_" + imageId + ".png/"));
System.out.println("Image Saved as Sinecure_" + imageId);
} catch (IOException e) {
e.printStackTrace();
}