I am writing a reminder program that pops up message dialogs. The problem is that all of the dialogs appear right on top of each other. I would prefer to have them cascade. Normally with other programs a dialog will apear then the next one will be slightly down and off to the side. My code snippet is as follows:
final JFrame frame = new JFrame( "A timer to be a reminder" );
frame.setVisible( false );
frame.setAlwaysOnTop(true);
int result = JOptionPane.showConfirmDialog( frame, msg, "Timer", JOptionPane.DEFAULT_OPTION);
Can anyone point out how to get the desired behavior?
This has been solved, I am attaching my code snippet so that someone else will be able to find it.
JFrame frame = new JFrame( "A timer to be a reminder" );
frame.setLocationByPlatform( true );
frame.setVisible( true );
frame.setAlwaysOnTop(true);
int result = JOptionPane.showConfirmDialog( frame, msg, "Timer", JOptionPane.DEFAULT_OPTION);
frame.setVisible( false );
frame = null;