java - Using JButton to change background color in JFrame ...
2014-6-11u2002·u2002Create a class with non-static fields and methods. Have your ActionListener call a method that in its body changes the background color of your main JPanel, the one that you add to the JFrame's contentPane. Consider using anonymous inner listener classes, and then off-load the meat of the listener code to a separate method, either in your GUI ...
Get Price