FileDocCategorySizeDatePackage
DynamicHookup.javaAPI DocExample820Sat Apr 23 22:35:40 BST 2005None

DynamicHookup

public class DynamicHookup extends JFrame

Fields Summary
JLabel
label
int
count
Constructors Summary
public DynamicHookup()


    
    JButton launchButton = new JButton("Launch!");
    getContentPane().add( launchButton, "South" );
    getContentPane().add( label, "Center" );
	launchButton.addActionListener( 
		(ActionListener)EventHandler.create(
			ActionListener.class, this, "launchTheMissiles"));
  
Methods Summary
public voidlaunchTheMissiles()

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

    JFrame frame = new DynamicHookup();
	frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
    frame.setSize(150, 150);
    frame.setVisible( true );