GeeCON Prague 2014*
The moose likes Swing / AWT / SWT and the fly likes regarding JDialog . Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "regarding JDialog ." Watch "regarding JDialog ." New topic
Author

regarding JDialog .

Rajeev Ravindran
Ranch Hand

Joined: Aug 27, 2002
Posts: 455
hi all,
I hava a JFrame with a JComboBox and JButton..when i click on this button, im invoking a new class which displays a JDailog with an OK button and a text field.. When i click on the OK button of the JDialog the value in the textfield will get populated on the JComboBox, it works fine . But my issue is, if i close the JDialog using the close button that comes with the JDialog, a null value is getting inserted into the combo box ..why is it so ?? cld anyone tell me how to reslove this ??
im using jdk1.3 , i cant use the setUndecorated() of jdk1.4 to disable the close button of JDialog, i tried
setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
but of no use
Cld any1 help me with me
Thanks
Rajeev


SCJP, SCWCD, SCBCD, Oracle Certified Professional (SQL n PL/SQL)
Jose Botella
Ranch Hand

Joined: Jul 03, 2001
Posts: 2120
If the user close the JDialog null is returned. Check for this value and place "" instead of it.


SCJP2. Please Indent your code using UBB Code
 
GeeCON Prague 2014
 
subject: regarding JDialog .