super("Toolbar Example (Swing)");
setSize(450, 250);
addWindowListener(new BasicWindowMonitor());
JPanel toolbar = new JPanel();
toolbar.setLayout(new FlowLayout(FlowLayout.LEFT));
cutButton = new JButton("Cut");
cutButton.addActionListener(this);
toolbar.add(cutButton);
copyButton = new JButton("Copy");
copyButton.addActionListener(this);
toolbar.add(copyButton);
pasteButton = new JButton("Paste");
pasteButton.addActionListener(this);
toolbar.add(pasteButton);
add(toolbar, BorderLayout.NORTH); // the new "preferred" BorderLayout add
// Add the look and feel controls using regular AWT buttons
JPanel lnfPanel = new JPanel();
LnFListener lnfListener = new LnFListener(this);
javaButton = new JButton("Metal");
javaButton.addActionListener(lnfListener);
lnfPanel.add(javaButton);
motifButton = new JButton("Motif");
motifButton.addActionListener(lnfListener);
lnfPanel.add(motifButton);
winButton = new JButton("Windows");
winButton.addActionListener(lnfListener);
lnfPanel.add(winButton);
add(lnfPanel, BorderLayout.SOUTH);