Java examples for Swing:JColorChooser
Creating a Color Chooser Dialog
import java.awt.Color; import javax.swing.JColorChooser; import javax.swing.JFrame; public class Main { public void main(String[] argv) { Color initialColor = Color.red; Color newColor = JColorChooser.showDialog(new JFrame(), "Dialog Title", initialColor);/*w ww . j a va 2s .c o m*/ } }