I have a JButton that when it is pressed, the background color of it changes. My problem now is how can I change it to its original color when it is pressed again? Here is my code so far..
JButton f= new JButton("G");
f.setBounds(62, 84, 45, 30);
f.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent arg0) {
f.setBackground(Color.CYAN);
}});