Is it possible to make JFrame always on top of applications. Does OpenGL and DirectX work?

I am currently working on notification using Java.

I need the window to be in the near future (about 10 seconds) on top of all applications. including those that run OpenGL and DirectX (like computer games). I know that JFrame.setAlwaysOnTop(true);it only works in windows in which OpenGL and DirectX are not. Thought of OpenGL bindings but can't find anything about DirectX?

Perhaps this is possible with JNI? Any ideas are welcome :-)

Edit: Thanks for the answers guys, but I really gave up on this and decided to force the game I'm making an overlay from in full-screen window mode. I just need to wait and see what beta testers say about lowering fps :-) Thanks again

+3
source share
2 answers

Do not worry about directx and java. This has an impedance mismatch. Java is a cross platform, OpenGL is a cross platform. If you insist on using directx, you can try SWT, since it uses its own resources of the operating system, you may have a chance.

For opengl, what you are looking for is integration of the canvas with the / jframe panel, for this you can use JOGL. I think lwjgl also has an implementation, but jogl is better. Then you can set alwaysOnTop on this jframe.

kenai.com/projects/jogl

0
source

, . . DirectX , .

DX/OpenGL API. , Java, :

  • ,
  • -mimpap ( )
  • , 1

, Vsync . .

FRAPS, .

0

Source: https://habr.com/ru/post/1787969/


All Articles