• Post Reply Bookmark Topic Watch Topic
  • New Topic

Activate frame always

 
Naresh Talluri
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have a small problem with my swing application
here iam using a panel to populated some data, that is on bottom with
small frame, and that should be on the top of all windows, even if we see
another windows and and performing any operations that small frame should
be active window...

can you please let me know if anyone have any ideas
appriciating for any clues

-Naresh

 
Rob Spoor
Sheriff
Posts: 20817
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Java 5.0, java.awt.Window got a method called "setAlwaysOnTop". JFrame inherits this method. Call it with true as its parameter and it should do what you want.

Keep in mind that the window manager must support this. Under Microsoft Windows that shouldn't be a problem, but some Linux / Unix window managers don't support it.
 
Naresh Talluri
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Rob Prime
now it is working properly......again thanks alot.


 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!