开发者

How to use palette window decorators in Java/Swing?

开发者 https://www.devze.com 2023-01-07 22:42 出处:网络
is there an op开发者_JS百科en solution to use palette window decorators in Java/Swing like in the following screenshot? JNIWrapper can do this but it is neither open nor free.

is there an op开发者_JS百科en solution to use palette window decorators in Java/Swing like in the following screenshot? JNIWrapper can do this but it is neither open nor free.

How to use palette window decorators in Java/Swing?


Have you looked at JNA library? Should be enough if you just have to call Windows API.


Here is the slolution:

User32.INSTANCE.SetWindowLong(new HWND(Native.getWindowPointer(frame)), -20, new Pointer(0x00000080L));

User32 is part of the JNA platform.jar. But most probably it only runs with a 32bit JVM. With 64bit you have to call SetWindowLongPtr but this doesn't seem to be mapped in JNA (UnsatisfiedLinkError).

0

精彩评论

暂无评论...
验证码 换一张
取 消