Meaningless Drivel is fun!*
The moose likes Swing / AWT / SWT and the fly likes JDialog - remove close option Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JDialog - remove close option" Watch "JDialog - remove close option" New topic
Author

JDialog - remove close option

Pam Ginther
Greenhorn

Joined: Jul 10, 2002
Posts: 10
Is it possible to remove the close icon on the top right? I want to create a JDialog that notifies the user that the application is loading but i want to control the closing and not the user. I want the box to be similar to what displays when you start up NetBeans or Forte.
Thanks in advance for your time.
Pam
kyle amburn
Ranch Hand

Joined: Jul 29, 2001
Posts: 64
You can call setUndecorated(true) on your JDialog to remove the title bar and the close button. If you are meaning for this to be a splash screen, then you would be better suited to use JWindow or JFrame, because otherwise you need a parent window for the screen. If you haven't loaded the main gui yet, then you won't have a parent window.
Kyle
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JDialog - remove close option
 
Similar Threads
Disabling The Maximize Box And The Close Box
JDialog Dilemma I Have
Using mouse double-click to close a JDialog
Close a JDialog?
closing a JDialog box