First Question:

How do you make a GUI close after the user inputs information (I know this should go somewhere in the HandlerClass)?

 

Second Question:

How do you make a class run after the user clicks on a button in another GUI?

 

code that I am trying (2nd Question):

if(checkbox.isSelected() && jbutton.getActionCommand()){

    Class1 c1 = new Class1();

     c1.setDefaultCloseOperation(EXIT_ON_CLOSE);

     c1.setSize(400, 350);

     c1.setVisible(true);

     }

Note: I am only focusing on the if statement and I renamed some things (for understanding purposes).

FacebookTwitterLinkedin
Pin It
Joomla Tutorials for Beginners