This week's book giveaway is in the HTML/CSS/JavaScript forum.
We're giving away four copies of Practical SVG and have Chris Coyier on-line!
See this thread for details.
Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Closing JInternalFrame

 
colin shuker
Ranch Hand
Posts: 750
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2703
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 750
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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);
 
Think of how stupid the average person is. And how half of them are stupider than that. But who reads this tiny ad?
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!