Motivation (cont’d)
What does add() to a Swing
(1) creates an instance of the appropriate
(2) registers it as a PropertyChangeListener for any changes in the action object, and
(3) returns a reference to the GUI for customization
One creates the action object by interfacing with an appropriate event handler, or subclassing a class that does this.