This might sound like it's very simple but I tried many things and it doesn't work.
When the user clicks the back button on a window it's supposed to also dispose another window.
I've tried using static.
if(Tester.backJButton.isEnabled())
{
this.dispose();
}
Tester is the name of the class holding the back button.
Thanks