aspose file tools
The moose likes Swing / AWT / SWT and the fly likes JFrame 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 "JFrame always on top" Watch "JFrame always on top" New topic
Author

JFrame always on top

Joel de Matos
Greenhorn

Joined: Nov 10, 2003
Posts: 16
Hello, i've searched for this in the forum but i didn't find anything usefull.
What i want is to make a JFrame to be always on top but not stealing the focus.
Scenario: I have a maximized app and i have a smaller jframe on top. When i click in the "main" application i want my JFrame to be on top of it but without stealing the focus from the application.
I have this code:

Can you help me?
Thanks!
[ November 20, 2003: Message edited by: Joel de Matos ]
VIJAY Yadlapati
Ranch Hand

Joined: Aug 04, 2003
Posts: 175
Use JDialog rather than JFrame, and no need to implement FocusListener.
Here is a small example..
Joel de Matos
Greenhorn

Joined: Nov 10, 2003
Posts: 16
Can't use JDialog... Doesn't have a maximize button :roll:
It really has to be a JFrame.
Thanks anyway
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8262

Originally posted by Joel de Matos:

Scenario: I have a maximized app and i have a smaller jframe on top. When i click in the "main" application i want my JFrame to be on top of it but without stealing the focus from the application.

Sounds like a job for JInternalFrame.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: JFrame always on top
 
Similar Threads
JDialog in front when JFrame on top?
Opening a frame from a dialog
Visual Age for Java: requestFocus() doesn't work
How can I get the feature ALWAYS_ON_TOP with the swing JFrames.
setAlwaysOnTop