How to display a color selector when clicking a button?
I'm making a program that draws some shapes and fills them with color. I need to change the 'line' color, and want the user to be able to select the color. How can I, when clicking a button "Choose Color", have a set of colours appear below the button? Is it possible for the selector to be embedded in the UI below the button (and not pop up in a window)? I want to display a color selector like in Paint. Here is a colour selection button class: shows current selected color opens a JColorChooser dialog when pressed fires events when a color is selected Use it in this way: ColorChooserButton