Solved

How to get option dialog back to top

Posted on 2004-10-11
8
279 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 92

Expert Comment

by:objects
ID: 12274929
(:
0
 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

733 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