• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

JFrame always on top

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Politics is a circus designed to distract you from what is really going on. So is this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic