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 close option in 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 "close option in JDialog" Watch "close option in JDialog" New topic
Author

close option in JDialog

Ling Chung
Ranch Hand

Joined: Mar 29, 2004
Posts: 39
Hi there,
how can i provide a JDialog that doesn't have a close option (the 'x' in the top right corner of the frame)?
Thanks for the help!!
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

No, but you can make it so that the x doesn't do anything.
setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
The other option is you could just use a JWindow which most people use for a splash screen as it has not "Title Bar" at all.


GenRocket - Experts at Building Test Data
 
wood burning stoves
 
subject: close option in JDialog
 
Similar Threads
disable previous JFrame upon new JFrame popup
Regarding JDialog
regarding JDialog .
I want to disable the Minimize / Maximize options on the System Menu
Icon for the title frame of the JDialog