Is there a library that has the Windows color picker you see in ms paint and the desktop wallpaper setting dialog and elsewhere? The tiny file dialogs that comes with lwjgl3 (lightweight java game library) doesn't support getting or setting the user defined colors. I've tried using the Windows forms one with jni4net, but can't get the example to run. Here's the Stackoverflow question for that: https://stackoverflow.com/questions/57083930/jni4net-example-in-visual-studio-community-2019-fails-to-build-despite-targeting It needs to be able to get and set the user defined colors.


MS Paint and similar are probably using the common dialog controls that Microsoft provides.

Probably won't be able to use the Windows one, but GTK, Qt, and WxWidgets all have some level of support or wrapper to be used from Java, and one or more of them should have a color picker dialog available.

| improve this answer | |

A time ago I developed the small library UiBooster. With it you can create a picker very easy. It is not the Paint color picker, but similar.

enter image description here

Color selectedColor = new UiBooster().showColorPicker("Choose your favorite color", "Color picking");
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.