Hi, I am using a JFrame as a pop-up from a main frame, where the user is supposed to enter some information and then press OK. But the problem is that once this sub-frame has opened up, I want the program to ignore any other signal until the OK button is pressed, similar as how it is done with JOptionPanes. As it is now, you could click the button to open up the sub-frame several times, thus getting several frames, and this is not the intention (it causes a lot of bugs even).
I could solve it with a boolean that is true once the OK button is pressed, but that doesn't seem like a cool way to fix it. I feel there has to be some other way of doing it, seeing as I can see the sought-after effect coming from my JOptionPanes, but can't get to it.
Cheers.