Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Disposing a Swing UI

 
Ashish Chopra
Ranch Hand
Posts: 134
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have a JPanel that contains several other UI components placed on it, like JButtons, JLabels, some more JPanels etc.

When I have to dispose this parent JPanel, I am simply doing



Will this correctly dispose off the panel, with all its components? Or is there a possibility of a memory leak due to this?

TIA
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic