• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

removed JInternalFrame

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After removing the component(which is instance of JInternalFrame e.g myForm) from JPanel, is myForm destroyed(e.g myPanel.remove(3) where component 3 is myForm)?
Thanks
 
Rancher
Posts: 3324
32
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should NOT be adding a JInternalFrame to a JPanel.

A JInternalFrame is designed to be used with a JDesktopPane only. Read the section from the Swing tutorial on How to Use Internal Frames for more information and examples.

Removing a component from a panel does not destroyed. This is easy to test. You create a simple JFrame with a panel in the "CENTER of the BorderLayout of the frame. Then create a "Remove" button that you can add to the "PAGE_START" of the frame and an "Add" button in the "PAGE_END". Then you just add/remove the panel and see what happens.

Part of programming is learning how to create a simple example to test your question. If the test program doesn't work as expected then you post the program with the question in the forum.
 
Z Morar
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much!
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic