I display now a warning in the console with code like:
System.out.println("Warning: You should re-arrange your images …);
but a user will not see this if the console window is not open.
So my question is what code should I add do the see the red triangle in the lower right corner if such a warning is logged?
Printing to the console should be reserved for more technical use than informing end users about important things. To trigger the red triangle (meaning "technical error" of some kind), use System.err.println).
With this said, I recommend this API:
engine.fireWarning("You should re-arrange your images");
This shows a yellow warning notification to the user. When running jAlbum from the command line, it just prints the warning to the cmd window.
However, engine.fireWarning requires jAlbum 30.3. To make it work on older jAlbum versions, you can use this code:
JNotification n = new JNotification(message, JNotification.Type.WARNING);
That code runs on all jAlbum versions since v8.9, but assumes that you run jAlbum in windowed mode.
Since v30.3, you can also use engine.fireRequestConfirmation(message) to trigger a warning DIALOG (not notification), having a yes/no option. This makes jAlbum pause and wait for user feedback. If the user cancels the dialog or hits "no", then the album build is aborted. This warning can be disabled under preferences ("Show warning dialogs")