My book on Java Patterns just got to something that we should probably implement here - Anonymous Adapter. Rather than creating the actionPerformed() for each button within the enclosing class, it can be part of the button's actionListener:

* OKButton.addActionListener(new ActionListener() {
*     public void actionPerformed(ActionEvent evt) {
*         doIt();
*         dialog.setVisible(false);
*     }
* });