Solved

How to get option dialog back to top

Posted on 2004-10-11
8
247 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

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…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

746 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

12 Experts available now in Live!

Get 1:1 Help Now