Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Updating a JPanel after it has been reinitiated  RSS feed

 
Eddy Paredes
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a JPanel in my application that has to be replaced entirely. See updateInputPanel(). It works the way I did it. But I'm not happy with it. Is there a way how to use repaint() or revalidate in my situation?

 
Liam Tiarnach
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps this example might be helpful...

[ December 06, 2007: Message edited by: Liam Tiarnach ]
 
Eddy Paredes
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for your response. As I can see in your example it still woud be nessesary to use getContentPane().removeAll().

I found another solution that doesn't require that.



It was that simple! Thank you anyway.
[ December 09, 2007: Message edited by: Eddy Paredes ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!