public class JButtonColorListener extends Object implements ActionListener, Serializable
The JButton object - button - is essentially a view of the model JColor. This is therefore a controller between the JColor object and the button representing the JColor object.
| Constructor and Description |
|---|
JButtonColorListener(Component parent,
JColor color,
JButton button)
Creates a ButtonColorListener object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(ActionEvent e)
Implementation of the actionPerformed() method of the ActionListener interface.
|
public JButtonColorListener(Component parent, JColor color, JButton button)
parentpanel - The component where the button is a component of.color - The JColor object that the button models itself on (The model)button - The JButton object that visually represents a JColor object. (The view)public void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenere - ActionEvent objectCopyright © 2019 JULIE Lab, Germany. All rights reserved.