Reputation: 15251
I have a JOptionPane which appears on top of it's parent JFrame window, but when the application is minimized and restored, only the JOptionPane will show and not the parent JFrame.
How to fix this bug?
Upvotes: 1
Views: 481
Reputation: 15333
JOptionPane
is a modal dialog box.
It means first you need to handle/close this dialog box then you will be able to access your main window.
So when you minimize everything and then restore it, it firstly shows the JOptionPane when you will close it or what it is supposed to do ONLY then you will get the main window.
It's not a bug. It is just how modal things work.
You will not be able to even Minimize the main window from icon when JOptionPane is up. You can minimize everything like with Window + D
key or Window + M
key in Windows PCs.
Upvotes: 1