• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to cancel a closing JInternalFrame  RSS feed

 
rednahs tawaci
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
good day to all javaRanchers!
i'm newbie here.
Everytime I close my JInternalFrame but decided to cancel the closing operation by clicking cancel button of a pop-up prompt dialog box, the JInternalFrame closes as if i click the ok button.
how can handle this event if I want to cancel a closing operation of a JInternalFrame?
thank you.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
set the default close operation

.setDefaultCloseOperation(JInternalFrame.DO_NOTHING_ON_CLOSE);

and then add the internalFrameListener, and its internalFrameClosing
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
...and Welcome to the Ranch
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!