if (captureFile == null) {
JOptionPane.showMessageDialog(null, "Could not create a screen capture");
return;
}
try {
AnnotateScreenCapture annotate = new AnnotateScreenCapture(captureFile, true);
if (annotate.showDialog() == AnnotateScreenCapture.APPROVE_OPTION) {
annotate.saveToFile(captureFile);
checklist.setCaptureFile(captureFile.getName());
}
} catch (IOException e1) {
e1.printStackTrace();
}