This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
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


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: 8914
    
    8

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]
 
GeeCON Prague 2014
 
subject: JFrame always on top