super("MenuGlueDemo");
menuBar = new JMenuBar();
setJMenuBar(menuBar);
addNewMenu("Menu 1");
addNewMenu("Menu 2");
menuBar.add(Box.createHorizontalGlue());
addNewMenu("Menu 3");
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});