File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
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: 15286
    
    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 - A Test Data Generation Platform
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: close option in JDialog
 
Similar Threads
disable previous JFrame upon new JFrame popup
Icon for the title frame of the JDialog
Regarding JDialog
regarding JDialog .
I want to disable the Minimize / Maximize options on the System Menu