1

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.

1
  • 1
    Which Paint do you mean? The new store app (Metro) or the classic one? There's at least the color picker dialog ... Commented Jun 19, 2020 at 9:43

3 Answers 3

2

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.

1

Since it about Java, what about JColorChooser?

2
0

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");

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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