Solved

How to get option dialog back to top

Posted on 2004-10-11
8
256 Views
Last Modified: 2010-03-31
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
Comment
Question by:sciuriware
8 Comments
 
LVL 92

Accepted Solution

by:
objects earned 125 total points
ID: 12274693
Pass your frame as the owner of the dialog

eg

JOptionPane.showMessageDialog(frame, "message");
0
 
LVL 5

Expert Comment

by:Naeemg
ID: 12274850
yes this is your solution

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

eg

JOptionPane.showMessageDialog(frame, "message");

 
 
 
0
 
LVL 24

Author Comment

by:sciuriware
ID: 12274917
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
 
LVL 92

Expert Comment

by:objects
ID: 12274929
(:
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 24

Author Comment

by:sciuriware
ID: 12275008
I didn't know (: yet, what is it?
;JOOP!
0
 
LVL 37

Expert Comment

by:zzynx
ID: 12276109
Same as :) but in the other direction
;°)
0
 
LVL 24

Author Comment

by:sciuriware
ID: 12276162
Ah Arabic!

;JOOP!
0
 
LVL 92

Expert Comment

by:objects
ID: 12283139
I need to work out how to do an upside down smiley.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now