• Post Reply Bookmark Topic Watch Topic
  • New Topic

Joptionpane on top of the screen

 
Mike Sullivan
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!