• Post Reply Bookmark Topic Watch Topic
  • New Topic

prevent close of JDialog except thru my button  RSS feed

 
Mike Southgate
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to eliminate the close button on the title bar of a JDialog. How do I do this?

ms
 
Rachel Swailes
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've never tried it myself, but try setUndecorated(true)

Or else you could have a WindowAdapter listening for the close event and then cancel the event.

rachel
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!