Task 3: Connect a Color Chooser to the Car Bean
- A combo box is in the Swing Controls part of the palette.
- Use the combo box's model property to set the color options.
- The handler you want to provide is for an Item event.
- The handler should set the car bean's color property to the
chosen color.
- The chosen color can be obtained from the ItemEvent
argument's getItem method.
- The returned item must be cast to String before you can use it.