• 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

Reinitialising a JInternalFrame

 
Ranch Hand
Posts: 56
Tomcat Server Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
final JInternalFrame taskSelectionFrameHeader = new JInternalFrame("Task Selection Screen", true, false, true, true);

I need to reuse the internal frame after using removeAll()...

How do I get it back to a point where I can put object back on it as if it was in a newly instantiated state?

Thanks
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
sounds like all you need to do is add objects the same way as when first initialized,
but because the component is already visible, you would need to call
internalFrame.revalidate();
after adding the new objects.
 
Michael Labuschagne
Ranch Hand
Posts: 56
Tomcat Server Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK that makes sense but my problem more lies in the fact that when I invoke a removeAll() even the window bar / minimize etc... buttons disappear... How do I get the frame back to it's normal state as if it had jst been instantiated.

JInternalFrame have a bar across the top of the window and minimize, maximize and close options...
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ah yes, forgot about internalFrame's northPane which would get the flick in a removeAll()

something like this (perhaps?) might suit

 
Michael Labuschagne
Ranch Hand
Posts: 56
Tomcat Server Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the trouble michael.... it's appreciated... thinking bout it now I could've jst looked at the code in JInternalFrames constructor...

Thanks a lot!!!
 
reply
    Bookmark Topic Watch Topic
  • New Topic