So heres my problem. I have a JFrame1 displayed on the screen. When I click on a button on JFrame1, another JFrame2 pops up. The instance of JFrame2 is held in JFrame1's class. JFrame2 uses getParent() in order to find JFrame1, it then calls setEnabled(false) to disable the main JFrame1. My problem is figuring out how to re-enable JFrame1 when it is already disabled, and JFrame2 gets closed. I've tried many ways including static methods in JFrame1, and trying to re-enable JFrame1 in the event handling method of JFrame2. getParent() doesnt seem to want to work in JFrame2 when JFrame1 is disabled, maybe because its a seperated JFrame2 looking for a JFrame1 when JFrame1 holds the instance of JFrame2 but JFrame2 was never add() to JFrame1, I dont know.
Basically, I'm wondering how I can re-enable a main JFrame ,after a second JFrame that has popped up, is closed. Thanks.