Getting Started


Adding an action to the Cancel button

When users select the Cancel button, you want the Customer Information window to close. This relationship is called an event-to-method connection.

  1. To make a connection from the Cancel push button, click mouse button 2 on the Cancel push button.

    The context menu is displayed.

  2. From the context menu, select Connect>actionPerformed.

    The mouse pointer is displayed as artwork connected to a dashed line. This indicates that you are in the process of making a connection.

  3. Click mouse button 1 on the title bar of your Window (the area that says Customer Information).

    A context menu is displayed.

  4. Select dispose().

    A green line with an arrow pointing from the Cancel push button to the Window edge is displayed. This connection means that when the Cancel push button is clicked, the dispose() method is triggered and the window is closed.

  5. From the Bean menu, select Save Bean.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]