Main GUI's method to react to alert frame's buttons
I have a method called checkForm in my GUI class, where when called, an alert frame pops up (called from another class AlertFrame).
Depending on what button the user clicks, OK or Cancel, I would like the checkForm method to do an if/else statement,
ex. if(OK button was pressed in AlertFrame, do this) else (Cancel button was pressed in AlertFrame, do this)
it is important to note that the AlertFrame is called from my checkForm(), and the if else statement is also in the checkForm()...
Any ideas? I have tried to create separate threads, listeners etc...nothing worked :s: