import java.awt.*; import java.awt.event.*; /** A simple ActionListener for the frames created by the TestCommands. It will be added to a button and simply closes the selected frame. */ public class MyActionListener implements ActionListener { private Frame frame; public MyActionListener(Frame f) { frame = f; } public void actionPerformed(ActionEvent e) { frame.dispose(); } }