wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes JFrame always on top Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
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: 8836
    
    7

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://aspose.com/file-tools
 
subject: JFrame always on top
 
Similar Threads
Opening a frame from a dialog
Visual Age for Java: requestFocus() doesn't work
JDialog in front when JFrame on top?
How can I get the feature ALWAYS_ON_TOP with the swing JFrames.
setAlwaysOnTop