If the GUI application is started with incorrect number of command line arguments, I need to display a message box on the center (TOP) of the screen. Once user presses ok on the message box, the app needs to exit. I am not really sure on how to handle this. Please help. [This message has been edited by Mike Sullivan (edited July 03, 2001).]
Devu Shah
Ranch Hand
Joined: Jun 21, 2001
Posts: 50
posted
0
Originally posted by Mike Sullivan: If the GUI application is started with incorrect number of command line arguments, I need to display a message box on the center (TOP) of the screen. Once user presses ok on the message box, the app needs to exit. I am not really sure on how to handle this. Please help. [This message has been edited by Mike Sullivan (edited July 03, 2001).]
I have done this by checking the length of args i.e [args.length] and compare it with the no of parameters u want if they are not equal then i use the static method of JOption pane i.e JOptionpane.showMessageDialog(null,message,name int option); then i check whether ok button is pressed if yes than i exit.