This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes JDialog Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JDialog" Watch "JDialog" New topic
Author

JDialog

Vaskar Dasgupta
Greenhorn

Joined: Jul 20, 2001
Posts: 25
How do i disable the x button on the top right corner of JDialog ?


Kindly reply back.
Jennifer Garrett
Greenhorn

Joined: Oct 31, 2001
Posts: 13
Try this line after you define dialog as the JDialog:
dialog.setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE );
Vaskar Dasgupta
Greenhorn

Joined: Jul 20, 2001
Posts: 25
Thanks a lot Jennifer for your response, i have tried that option but unfortunately the line of code you suggested only removes the functionality of the button, i am looking forward to something like making the button GRAYED in color (Like you see it in windows, a grayeed disabled button .....)
Waiting for your response.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDialog
 
Similar Threads
JFRAME STAY IN FRONT
Regarding JDialog
Poping up a JPanel in JApplet
Modal Frames
JDialog with ClassCastException ?!??!