aspose file tools*
The moose likes Beginning Java and the fly likes Default Dialog Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Default Dialog" Watch "Default Dialog" New topic
Author

Default Dialog

Angela Jessi
Ranch Hand

Joined: Nov 27, 2000
Posts: 428
Hi,
Can I have default standard dialog box in Java? (If I don't want to create Dialog object)
Thanks,
Angela
Matt Senecal
Ranch Hand

Joined: Dec 01, 2000
Posts: 255
Java comes with several pre-defined dialogs, JOptionPanes. They're pretty easy to use. Give them some simple parameters and you've got a dialog! More on them can be found at:
http://web2.java.sun.com/docs/books/tutorial/uiswing/components/dialog.html#features
More on dialogs can be found at:
http://web2.java.sun.com/docs/books/tutorial/uiswing/components/dialog.html

Originally posted by Angela Jessi:
Hi,
Can I have default standard dialog box in Java? (If I don't want to create Dialog object)
Thanks,
Angela


There's nothing more dangerous than a resourceful idiot. ---Dilbert
Angela Jessi
Ranch Hand

Joined: Nov 27, 2000
Posts: 428
Thanks Matt,
But I am restricted to use AWT.I don't want to use Swing. Any suggestions in AWT. Instead of initiating the object , if i can use standard dialog directly ?
Thanks again,
angela
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

I don't think I'm alone in wondering exactly what it is you are asking. Can you be a bit more clear exactly what you're trying to do?
Here is my best guess:
You want some default behaviour for a message type of dialog. Eg:

And the dialog that is presented already has an OK button, and a window closing 'X' that works, etc...
If this is the case, then write your own MsgBox class that extends Dialog, and use this new class, instead of Dialog.
But in any event, to make use of a class, you need to instantiate it, unless of course you make some static members/methods.

 
 
subject: Default Dialog