• Post Reply Bookmark Topic Watch Topic
  • New Topic

f.getContentPane().removeAll() is not redrawing the frame

 
Anchit Jindal
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to redraw a frame using above statement but it does not redraw the frame instead it is creating a new frame having the same properties as 'f'. Please tell how to redraw the existing frame without creating a new one.
 
Suvojit Chakraborty
Ranch Hand
Posts: 66
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do youmean that components are not getting erased from frame???
If yes then try using revalidate() if you are working with swings else validate() for awt
 
Rob Camick
Ranch Hand
Posts: 2699
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use a Card Layout.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!