• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JFrame always on top

 
Joel de Matos
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use JDialog rather than JFrame, and no need to implement FocusListener.
Here is a small example..
 
Joel de Matos
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can't use JDialog... Doesn't have a maximize button :roll:
It really has to be a JFrame.
Thanks anyway
 
Joe Ess
Bartender
Posts: 9313
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic