@Override public void run() { frame.setPreferredSize(new Dimension(1024, 600)); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); initComponents(); loadURL("http://oracle.com"); frame.pack(); frame.setVisible(true); }
// Create the GUI and show it. private static void createAndShowGUI() { // Create and set up the window. frame = new JFrame("Capture Replay"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // Create and set up the content pane. JComponent newContentPane = new CaptureReplay(); newContentPane.setOpaque(true); // content panes must be opaque frame.setContentPane(newContentPane); frame.setPreferredSize(new Dimension(400, 400)); // Display the window. frame.pack(); frame.setVisible(true); }