FileDocCategorySizeDatePackage
ToolbarFrame1.javaAPI DocExample1170Sun Aug 23 19:45:06 BST 1998None

ToolbarFrame1

public class ToolbarFrame1 extends Frame implements ActionListener

Fields Summary
Button
cutButton
Button
copyButton
Button
pasteButton
Constructors Summary
public ToolbarFrame1()

    super("Toolbar Example (AWT)");
    setSize(450, 250);
    addWindowListener(new BasicWindowMonitor());
  
    Panel toolbar = new Panel();
    toolbar.setLayout(new FlowLayout(FlowLayout.LEFT));

    cutButton = new Button("Cut");
    cutButton.addActionListener(this);
    toolbar.add(cutButton);

    copyButton = new Button("Copy");
    copyButton.addActionListener(this);
    toolbar.add(copyButton);

    pasteButton = new Button("Paste");
    pasteButton.addActionListener(this);
    toolbar.add(pasteButton);

    add(toolbar, BorderLayout.NORTH);
  
Methods Summary
public voidactionPerformed(java.awt.event.ActionEvent ae)

    System.out.println(ae.getActionCommand());
  
public static voidmain(java.lang.String[] args)

    ToolbarFrame1 tf1 = new ToolbarFrame1();
    tf1.setVisible(true);