Reputation: 31
I am creating a paint program in java for class. The user needs to be able to define custom colors to paint with. I figure the best way to go about this would be to have an icon the user clicks on, resulting in a pop-up selection window with sliders to define the three RGB values of a color. What would be the best way to go about this? I've found JSlider
but can't figure out how to implement it as a pop-up window as a result of an icon being clicked.
Upvotes: 2
Views: 476
Reputation: 168825
Use a JColorChooser
. See How to Use Color Choosers for details.
Upvotes: 3