I want my button to run a whole new class that will do different things inside. I don't know if that is even possible cause i'm really bad at java. My code looks like this at the moment:
public class MainMenu {
    private class GardenActivities {
        public GardenActivities() {
            JFrame GardenAct = new JFrame();
            GardenAct.setSize(400, 400);
            GardenAct.setVisible(true);
        }
    }
    public static void main(String[] args) {
        JFrame choice = new JFrame();
        choice.setSize(700, 500);
        choice.setLocationRelativeTo(null);
        choice.setTitle("Seeds");
        choice.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        JPanel panel = new JPanel();                                                        
        panel.setLayout(new GridLayout(0, 1));
        JButton Labora = new JButton();
        Labora.setText("Laboratory");
        Labora.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent ev) {
                      GardenActivities();
                }
        });
        JButton Garden = new JButton();
        Garden.setText("Garden");
        Garden.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent ev) {
            }
        });
        choice.getContentPane().add(panel);
        ButtonGroup group = new ButtonGroup();                                              
        group.add(Garden);
        group.add(Labora);
        panel.add(Garden);
        panel.add(Labora);
        choice.setVisible(true);
    }
}
Just like I said. I need something to run my GardenActivities class just by pressing Garden button.
 
     
     
     
    