• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 325
  • Last Modified:

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!
0
sciuriware
Asked:
sciuriware
1 Solution
 
objectsCommented:
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now