aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Closing JInternalFrame Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Closing JInternalFrame" Watch "Closing JInternalFrame" New topic
Author

Closing JInternalFrame

colin shuker
Ranch Hand

Joined: Apr 11, 2005
Posts: 744
Hi, I'm stuck on how to remove a JInternalFrame that has been minimised.

When its not minimised I just call remove(...) on its container, which works.

Also I mean, how do I do using code (triggered by button or menu etc etc) instead of manually pressing X on the JInternalFrame.

Thanks for any help.
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2183
    
    7
When its not minimised I just call remove(...) on its container, which works.


Then I would restore the frame first and then remove it.

how do I do using code (triggered by button or menu etc etc)


Check out the API. There are various method for changing the state of the internal frame.
colin shuker
Ranch Hand

Joined: Apr 11, 2005
Posts: 744
Thanks, I had to use isIcon(), cause when you iconify it, it is no longer added to its container.

Then when it was iconified, I did setIcon(false);
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Closing JInternalFrame