System.out.println ("Selected: " + e.getActionCommand());
enableEvents (AWTEvent.CONTAINER_EVENT_MASK); add (b = new Button ("One")); add (b = new Button ("Two")); add (b = new Button ("Three")); add (b = new Button ("Four"));
if (e.getID() == ContainerEvent.COMPONENT_ADDED) { if (e.getChild() instanceof Button) { Button b = (Button)e.getChild(); b.addActionListener (this); } }