• Post Reply Bookmark Topic Watch Topic
  • New Topic

How do you make a frame 'Always on Top'?

 
james wilson
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to amke a frame always on top. I'm writing a standalone application that needs the frame to always be in view no matter what application opens.
cheers
james
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
James,

In pure Java you can make a JDialog modal to the application, but you can't make the application modal to all applications ( does that make sense? ) Basically, you can make JDialogs modal inside your program, but you can't make a Java frame modal to all applications. This is due to Java's platform independant structure, and loose coupling with native code "under-the-hood".

However - - -
There may be some way of interfacing with native OS code to make a JFrame modal to other applications... however, it wouldn't be platform independent then...

-Nate
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!