Question

is there an open 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.

Small window decorator

Was it helpful?

Solution 2

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).

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top