remove a component from java swing code example
Example: how to remove components from a JFRame java
private JFrame frame = new JFrame();
...
...
frame.getContentPane().removeAll();
frame.repaint();
private JFrame frame = new JFrame();
...
...
frame.getContentPane().removeAll();
frame.repaint();