If you want to give your user the chance to select colors from a dialog, you may add the Swing Color Chooser to your project.
| First select the Color Chooser from the Swing Containers pallet. | |
| To add it to the project, select the frame and the design tab. Next click on the Color Chooser component and then click anywhere in the Structure pane (while still in the design tab). | |
| Either a menu item or button (or both) may be used to display the color menu and use the new color. Here is a handler for a menu item. Toolbutton handlers would be similar. | |
Calls to the routine will display this Swing Color Chooser.