Remove « JLabel « Java Swing Q&A





1. How to remove JLabels?    stackoverflow.com

Just how you add JLabels, JTextFields, JButtons by doing this add(label1); add(button1); how to remove? I have a button that will remove a particular JTextField. The button:

thehandler3 handler3 = new thehandler3();
button3.addActionListener(handler3); // first x ...

2. How to remove a JLabel?    forums.oracle.com