This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDialog X Button

 
Karen Baog
Ranch Hand
Posts: 120
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

How do I get rid of the X button on the top right corner of a JDialog box?

Thanks to all.
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't. You can disable it though. setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE); That way, when the user hits the X, nothing will happen.
 
Karen Baog
Ranch Hand
Posts: 120
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

How do I catch the event when the User clicks on the X button ?

Cheers!
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to register a WindowListener, as far as I remember.
 
Scott Delap
author
Ranch Hand
Posts: 73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might check this out:

Customizing Window Adornments
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic