How to remove a button from a frame?
JFrame frame = new JFrame(); JButton button = new JButton(); frame.getContentPane().add(BorderLayout.SOUTH, button); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(500, 500); frame.setVizible(true); And now, how do I remove a button from a frame?
frame.getContentPane().remove(button);- Senior Pomidor