This week's book giveaway is in the Agile forum.
We're giving away four copies of Head First Agile and have Andrew Stellman & Jennifer Greene on-line!
See this thread for details.
Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

close option in JDialog  RSS feed

 
Ling Chung
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!