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 hide x-Close-Button in a 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 "hide x-Close-Button in a JDialog" Watch "hide x-Close-Button in a JDialog" New topic
Author

hide x-Close-Button in a JDialog

Andy Jung
Ranch Hand

Joined: Feb 07, 2010
Posts: 150
Hi,
how is it possible to hide the x-Close-Button in the upper-right corner of a JDialog (I don't mean disable) ?
Kind regards,
Andy


SCJP, SCJD
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
you would need to give java control of the titlebar
JDialog.setDefaultLookAndFeelDecorated(true);

then iterate the dialog's components to get the button, so it can be removed
Andy Jung
Ranch Hand

Joined: Feb 07, 2010
Posts: 150
... thanks, nice idea !
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: hide x-Close-Button in a JDialog
 
Similar Threads
Browsers close button
Disabling the 'X' button of JDialog
Getting a null frame (Event dispatching problem?)
JDialog
How prevent the user closing the Joptionpane by clicking the X in the right end corner