aspose file tools
The moose likes Swing / AWT / SWT and the fly likes modal dialog always on top Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "modal dialog always on top" Watch "modal dialog always on top" New topic
Author

modal dialog always on top

sakthivel palaniappan
Greenhorn

Joined: Jul 04, 2001
Posts: 4
Does anyone know how to create a modal dialog box in Java Swing that is
always on top of other components (i.e., can't be hidden by the other
components until the user closes it)?
thanks
Paul Stevens
Ranch Hand

Joined: May 17, 2001
Posts: 2823
You mean like look at the API and use the constuctor with the modal flag.
Javaoops
Ranch Hand

Joined: Jun 21, 2001
Posts: 57
Hi
When u create a modal dialog, it is always on the top of the application until it is closed.
JDialog(Dialog owner, boolean modal)
set modal as true.

sakthivel palaniappan
Greenhorn

Joined: Jul 04, 2001
Posts: 4
thanks for ur reply,
i got the modal dialog
but i want the dialog to be on top of all applications
Paul Stevens
Ranch Hand

Joined: May 17, 2001
Posts: 2823
IMO that is bad user design. As a user I don't ever want someone locking up all of my other applications by having another modal application. If a user wants to switch, why should you prevent them?
sakthivel palaniappan
Greenhorn

Joined: Jul 04, 2001
Posts: 4
that is my client's requirement.
This dialog pops up from a crm console,whenever there is some user activity(email,chat request,etc).As these needs to be answered immdly,the dialog should be on top of all apps to get the console owner's attention
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: modal dialog always on top
 
Similar Threads
Problem with a modal dialog
JDialog setModal() hierarchy
JDialog (non-modal) always on top
the sense of setModal(boolean) in JDialog inherited from Dialog
Always in Front