private static void createAndShowGUI(){
  JFrame frame=new JFrame("MenuLookDemo");
  frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  MenuLookDemo demo=new MenuLookDemo();
  frame.setJMenuBar(demo.createMenuBar());
  frame.setContentPane(demo.createContentPane());
  frame.setSize(450,260);
  frame.setVisible(true);
}

private static void createAndShowGUI ( ) { JFrame frame = new JFrame ( "MenuLookDemo" ) ; frame . setDefaultCloseOperation ( JFrame . EXIT_ON_CLOSE ) ; MenuLookDemo demo = new MenuLookDemo ( ) ; frame . setJMenuBar ( demo . createMenuBar ( ) ) ; frame . setContentPane ( demo . createContentPane ( ) ) ; frame . setSize ( 450 , 260 ) ; frame . setVisible ( true ) ; }
create the gui and show it . for thread safety , this method should be invoked from the event - dispatching thread .
