aspose file tools *
The moose likes Swing / AWT / SWT and the fly likes Always on top? Big Moose Saloon
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Always on top?" Watch "Always on top?" New topic

Always on top?

ryan headley
Ranch Hand

Joined: Jun 28, 2000
Posts: 156
Is there a way to make a JFrame stay on top of all other open windows?? I don't think this is just a windows thing...if it is, I apologize.
Will modal do this for me? Or does modal just say that you can't do anythign with the rest of the application?

Paul Stevens
Ranch Hand

Joined: May 17, 2001
Posts: 2823
Not sure if I am following your question but modal is for the java application you are running. I think modal is for JDialogs and not JFrames.
From your wording it sounds like you want to make your java app modal to any app running on windows. I don't know why you would want to do that at all.
ryan headley
Ranch Hand

Joined: Jun 28, 2000
Posts: 156
For clarification, one would want to do this if the windows was constantly updating with messages.
I wrote an alert messaging system for a helpdesk. When someone gets a call that concerns a wide impact, rather than having 17 different people open a ticket for the same issue, they will increment a call counter.
In short, system goes down, someone sends a message to the team that the system is down.
Its just a small window sitting at the top left of there screen. When a message pops, it beeps. If another windows is over the top, they have to minimize the windows to view the message. If that person is on the phone, that takes time away from the customer (I know its nit picky, but I am not the boss).
If they can just glance at the corner of their screen, without having to move anything around, that would be better.
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Hi Ryan,
I don't think modal is the way to go from your description. Did you try toFront() method of Window? You can call it immediately after setting some good message ...
ryan headley
Ranch Hand

Joined: Jun 28, 2000
Posts: 156
That will probably work half way.
What I really need is it to stay on top of other windows. (its really small and non intrusive. Kinda like you can do with some Windoze programs, like WinAmp.
I agree. Here's the link:
subject: Always on top?