public static void main(String args[]) { // UIManager.put("PopupMenu.border", new BorderUIResource.EmptyBorderUIResource(4,0,4,0)); try { UIManager.setLookAndFeel(QuaquaManager.getLookAndFeelClassName()); // UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); } catch (Exception e) { e.printStackTrace(); } JFrame f = new JFrame("PopupMenuTest: " + UIManager.getLookAndFeel().getName()); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.getContentPane().add(new PopupMenuTest()); f.pack(); f.setVisible(true); }
public static void createAndShowGUI() { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) { ex.printStackTrace(); } JFrame frame = new JFrame("@title@"); frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); frame.getContentPane().add(new MainPanel()); frame.pack(); frame.setLocationRelativeTo(null); frame.setVisible(true); }