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.
Use a JColorChooser
. See How to Use Color Choosers for details.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.