Java Glossary : JDialog

CMP home Java glossary home Menu no menu Last updated 2004-06-28 by Roedy Green ©1996-2004 Canadian Mind Products

Java definitions: 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

You are here : home : Java Glossary : J words : JDialog.

JDialog
JDialogs are a type of Window that pop up over a parent JFrame, usually to ask the user to confirm something or display an About box. JDialogs can be modal or non-modal. Modal JDialogs monopolise the user's attention, preventing him from clicking anywhere but in the jdialog box.

For simple questions, you can use JOptionPane.showInputDialog which comes in two versions, one that just prompts for a String and one that selects an item from a list.

If JDialogs fail to paint anything, it could be because you forgot to do a setSize, validate(), or setVisible( true ). JDialog.setBackground does not work. Use jdialog.getContentPane().add( child );

Dialog is the AWT equivalent of JDialog.


CMP logo
CMP_home
home
Canadian Mind Products CSS
HTML Checked!
ICRA ratings logo
mindprod.com IP:[24.87.56.253]
Your IP:[80.134.30.163]
You are visitor number 4233.
Please send errors, omissions and suggestions
to improve this page to Roedy Green.
You can get a fresh copy of this page from: or possibly from your local J: drive mirror:
http://mindprod.com/jgloss/jdialog.html J:\mindprod\jgloss\jdialog.html