public static void main(String[] args) { NativeInterface.open(); SwingUtilities.invokeLater(new Runnable() { public void run() { JFrame frame = new JFrame("DJ Native Swing Test"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().add(new SimpleWebBrowserExample(), BorderLayout.CENTER); frame.setSize(800, 600); frame.setLocationByPlatform(true); frame.setVisible(true); } }); NativeInterface.runEventPump(); }
public static void openBrowser(final String url, final String usernameID, final String passwordID, final String username, final String password){ NativeInterface.open(); SwingUtilities.invokeLater(new Runnable() { public void run() { try{ JFrame frame = new JFrame("Web Browser"); frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); frame.getContentPane().add(new WebBrowserPanel(url, usernameID, passwordID, username, password), BorderLayout.CENTER); frame.setSize(800, 600); frame.setLocationByPlatform(true); frame.setVisible(true); }catch(Exception e){ JOptionPane.showMessageDialog(null, "Cannot connect to the ripple site. URL - "+url); e.printStackTrace(); } } }); //NativeInterface.runEventPump(); }
public SimpleWebview() { setLayout(new BorderLayout()); NativeInterface.open(); JWebBrowser webBrowser = new JWebBrowser(); webBrowser.navigate("file://" + GuiUtils.getActualPath("conf/SimpleWebview/index.html")); JPanel webBrowserPanel = new JPanel(new BorderLayout()); webBrowserPanel.add(webBrowser, BorderLayout.CENTER); add(webBrowserPanel, BorderLayout.CENTER); }
public static void main(String[] args) { UIUtils.setPreferredLookAndFeel(); NativeInterface.open(); SwingUtilities.invokeLater(new Runnable() { public void run() { JFrame frame = new JFrame("DJ Native Swing Test"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().add(new NavigationParameters(), BorderLayout.CENTER); frame.setSize(800, 600); frame.setLocationByPlatform(true); frame.setVisible(true); } }); NativeInterface.runEventPump(); }
NativeInterface.open(); SwingUtil.installDefaults(); Options options = new Options(); NativeInterface.runEventPump(); } catch (ParseException ex) { LOG.error("Couldn't parse the command line", ex);