How to make a JButton disappear?
807591Jun 3 2008 — edited Jun 4 2008I have a JScrollPane and an arrayList of JButtons. When you click on a JButton, the JButton would disappear(only the click JButton). The class implements ActionListener(with ActionEvent ae. How do I make the JButton disappear. I tried doing JScrollPaneName.remove(ae.getSource())
and
if(ae.getSource() == ArrayListName.get(0))
{
ArrayListName.remove(0);
}