How to get option dialog back to top

Hi, my SWING applications extensively use JOptionPane dialogs.
If I obscure a lengthy operation by other applications or if I iconise it, then
after some time it might ask a question by means of a dialog.
Now, whenever I therefore take the application back to front, it appears
that the dialog hides BEHIND the main frame and can only be
put to front (mandatory since it concerns modal dialogs) by
tabbing (Alt+Tab) through the applications.
What did I forget when writing the dialog calling code?

This is an MSWindows problem; on LINUX I always use separate desktops.
;JOOP!
LVL 24
sciuriwareAsked:
Who is Participating?
 
objectsConnect With a Mentor Commented:
Pass your frame as the owner of the dialog

eg

JOptionPane.showMessageDialog(frame, "message");
0
 
NaeemgCommented:
yes this is your solution

 Comment from objects
Pass your frame as the owner of the dialog

eg

JOptionPane.showMessageDialog(frame, "message");

 
 
 
0
 
sciuriwareAuthor Commented:
Yes guys, I always did, but now I found that I forgot to add that reference in one place;
how stupid.

Naeemg, you don't have to support objects: I know him.

Well, another good reason to review al my code.

Greetings!

;JOOP!
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
objectsCommented:
(:
0
 
sciuriwareAuthor Commented:
I didn't know (: yet, what is it?
;JOOP!
0
 
zzynxSoftware engineerCommented:
Same as :) but in the other direction
;°)
0
 
sciuriwareAuthor Commented:
Ah Arabic!

;JOOP!
0
 
objectsCommented:
I need to work out how to do an upside down smiley.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.