My program consists of 3 main 'sections'. Main function, Login form and App form. The main function should do something like: Open Login form, wait for it to close, then open App form. I can't get the waiting part to work, or rather, I don't know how I would go around doing that.
I was told by someone to use a JDialog instead and use setModal(true)
, but with that approach the Login form wouldn't appear on the taskbar, which is terrible in my opinion.
Another thing I considered was to open the App from inside the Login after it closes, but that feels like bad design since that'd make the Login form non-reusable.
So, please, what would you suggest?