Originally posted by yue feng:
I am trying to remove all the components from my frame(instance of jframe class) and then add everything to it again. what i used is removeAll() function(after that, i rerendered everyone back on my frame again). however, once i add this function, all my components would not show up, and even the frame was minimized when starting the program. does anyone have any idea why?
After you call removeAll, make sure you re-add each component to the frame:
frame.getContentPane().removeAll();
// need to add components back to frame:
frame.getContentPane().add(component1);
frame.getContentPane().add(component2);
frame.getContentPane().add(component3);
//...