JFrame (swing) switching repeating actions with buttons
I want a JFrame application with 2 buttons (eventually more) that I can use to switch between multiple repeating actions, ofr simplicity I'm just using a console print for now, though it will probably be calling a method instead later. Here is the framework for the JFrame: public class DayNight extends JFrame implements ActionListener{ //JFrame entities private JPanel animationPanel; private JButton button; private JButton button2; public static void main(String[] args) { DayNight frame = new DayNight(); frame.setSize(2000, 1300); frame.setLocation(1000,350); frame.createGUI(); frame