void (String[] args) { Main f = new Main(); JFrame frame = new JFrame(ourBundle.getString("form.preview.title")); frame.setContentPane(f.myComponent); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // Add menu bar final JMenuBar menuBar = new JMenuBar(); frame.setJMenuBar(menuBar); final JMenu menuFile = new JMenu(ourBundle.getString("form.menu.preview")); menuFile.setMnemonic(ourBundle.getString("form.menu.preview.mnemonic").charAt(0)); menuFile.add(new JMenuItem(new MyPackAction(frame))); menuFile.add(new JMenuItem(new MyExitAction())); menuBar.add(menuFile); final JMenu viewMenu = new JMenu(ourBundle.getString("form.menu.laf")); viewMenu.setMnemonic(ourBundle.getString("form.menu.laf.mnemonic").charAt(0)); menuBar.add(viewMenu); final UIManager.LookAndFeelInfo[] lafs = UIManager.getInstalledLookAndFeels(); for(int i = 0; i < lafs.length; i++){ viewMenu.add(new MySetLafAction(frame, lafs[i])); } frame.pack(); frame.setLocationRelativeTo(null); frame.setVisible(true); }