FileDocCategorySizeDatePackage
RootExample3.javaAPI DocExample800Thu Oct 24 20:14:24 BST 2002None

RootExample3

public class RootExample3 extends JFrame

Fields Summary
Constructors Summary
public RootExample3()

    super("RootPane Menu Demo");
    setSize(220,100);
    setDefaultCloseOperation(EXIT_ON_CLOSE);

    // Create a menu bar
    JMenuBar bar = new JMenuBar();
    JMenu menu = new JMenu("File");
    bar.add(menu);
    menu.add("Open");
    menu.add("Close");
    setJMenuBar(bar);

    // Add a button to the content pane
    getContentPane().add(new JButton("Hello World"));
  
Methods Summary
public static voidmain(java.lang.String[] args)

    RootExample3 re3 = new RootExample3();
    re3.setVisible(true);