aspose file tools*
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 Spring in Action this week in the Spring 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
 
Consider Paul's rocket mass heater.
 
subject: close option in JDialog