FileDocCategorySizeDatePackage
DynamicHookupTest.javaAPI DocExample876Mon May 01 14:42:06 BST 2000None

DynamicHookupTest

public class DynamicHookupTest extends JFrame

Fields Summary
DynamicActionAdapter
actionAdapter
JLabel
label
int
count
Constructors Summary
public DynamicHookupTest()


      
    JButton launchButton = new JButton("Launch!");
    getContentPane(  ).add( launchButton, "South" );
    getContentPane(  ).add( label, "Center" );
    actionAdapter.hookup(launchButton, this, "launchTheMissiles");
  
Methods Summary
public voidlaunchTheMissiles()

    label.setText("Launched: "+ count++ );
  
public static voidmain(java.lang.String[] args)

    JFrame f = new DynamicHookupTest(  );
    f.addWindowListener(new WindowAdapter(  ) {
      public void windowClosing(WindowEvent we) { System.exit(0); }
    });
    f.setSize(150, 150);
    f.setVisible( true );