// // dispButtonHandler.java // // 05-05-2002 Bikle // // Imports // ///////////////// import java.awt.*; import java.awt.event.*; import javax.swing.*; // //////////// class dispButtonHandler implements ActionListener { // //////////// // Declarations // ///////////////// // This declaration is for an object I'm sending to constructor. objArray XobjArray; // Constructors // ///////////////// public dispButtonHandler (objArray PobjArray) { XobjArray = PobjArray; // Now that the objArray is passed in, // I may gain access to the data within it. } // Methods // ///////////////// public void actionPerformed(ActionEvent Event) { // Now you need to think in visual terms. // Picture a little robot sitting in a chair. // When the user presses the "Display" button, // an electric shock is sent to the robot and he gets out of the chair. // He then needs someone to tell him what to do. // This method is the place where I supply him instructions. dispGUI XdispGUI = new dispGUI(XobjArray); } }