• Post Reply Bookmark Topic Watch Topic
  • New Topic

JFrame

 
Rajib Sarma
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm a new comer in Java. My problem is -
How do I prevent a frame from closing after
clicking on X.
Thanks
-Rajib
 
Roy Ben Ami
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use the method:
setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!