/** @param args the command line arguments */ public static void main(String args[]) { NativeInterface.open(); UIUtils.setPreferredLookAndFeel(); try { org.jb2011.lnf.beautyeye.BeautyEyeLNFHelper.launchBeautyEyeLNF(); UIManager.put("RootPane.setupButtonVisible", false); } catch (Exception e) { } /* Set the Nimbus look and feel */ // <editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(WebBrowser.class.getName()) .log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(WebBrowser.class.getName()) .log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(WebBrowser.class.getName()) .log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(WebBrowser.class.getName()) .log(java.util.logging.Level.SEVERE, null, ex); } // </editor-fold> // </editor-fold> SwingUtilities.invokeLater( new Runnable() { public void run() { JFrame frame = new JFrame("Gourmet Solutions"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().add(createContent(), BorderLayout.CENTER); frame.setSize(800, 600); frame.setLocationByPlatform(false); // frame.setLocationRelativeTo(null); frame.setVisible(true); } }); NativeInterface.runEventPump(); }
/* Standard main method to try that test as a standalone application. */ public static void main(String[] args) { NativeInterface.open(); UIUtils.setPreferredLookAndFeel(); SwingUtilities.invokeLater( new Runnable() { public void run() { JFrame frame = new JFrame("DJ Native Swing Test"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().add(createContent(), BorderLayout.CENTER); frame.setSize(800, 600); frame.setLocationByPlatform(true); frame.setVisible(true); } }); NativeInterface.runEventPump(); }