explicit destination file name

This commit is contained in:
rusefillc 2024-02-08 11:17:33 -05:00
parent c624440ab3
commit 18c983aa5d
1 changed files with 3 additions and 2 deletions

View File

@ -48,9 +48,10 @@ public class UiUtils {
public static void saveImage(String fileName, Component component) {
BufferedImage img = getScreenShot(component);
System.out.println("Saving " + fileName);
try {
ImageIO.write(img, "png", new File(fileName));
File output = new File(fileName);
System.out.println("Saving " + output.getAbsolutePath());
ImageIO.write(img, "png", output);
} catch (IOException e) {
throw new IllegalStateException(e);
}