FileDocCategorySizeDatePackage
RootExample3.javaAPI DocExample548Mon Nov 09 12:45:54 GMT 1998None

RootExample3

public class RootExample3 extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

    JFrame f = new JFrame();
    f.addWindowListener(new BasicWindowMonitor());
    JMenuBar bar = new JMenuBar();
    JMenu menu = new JMenu("File");
    bar.add(menu);
    menu.add("Open");
    menu.add("Close");

    // Shortcuts provided by JFrame (and other RootPaneContainers)...
    f.setJMenuBar(bar);
    f.getContentPane().add(new JButton("Hello World"));

    f.pack();
    f.setVisible(true);