Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Reopening internal frames after they have been shut

 
luke patte
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm having trouble reopening JInternalFrames after they have neen shut.
i've tried things like
Frame.show();
Frame.setVisible(true);
frame.setClosed(false);
frame.setIcon(false);
but it wont reopen it, only deiconify it etc. Any help would be much appreciated.
Cheers
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depends on how you are closing it. When you click the X in the upper right corner, the frame is actually disposed. So in order to show the frame again, a new instance of it is required in memory ( frame = new Frame()). Once you have created a new frame, you can then call setVisible(true) to display the frame.
If you need to close a frame without it being disposed, you need to catch the windowClosing() event and simply do a setVisible(false). Then you can setVisible(true) without having to create a new instance of that frame.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!