Toc7777 0 Newbie Poster

Hi all,
I have a GUI based roulette game with two classes a bet screen and a main menu screen i need to know how to say if a button is pressed in the bet screen to do its operations and then close and return to the main menu screen. This is a piece of the code

new ActionListener()
    {
       public void actionPerformed( ActionEvent event )
    {
         BetScreen betScreen = new BetScreen();
            betScreen.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         betScreen.setSize(300,100);
         betScreen.setVisible(true);
         if(event.getSource() == BetScreen.oddButton)
         {
             betScreen.setVisible(false);
         }//end if
         
    }//end method actionPerformed
            
    }//end method actionListener
    );//end call to addActionListener