Exemplo n.º 1
0
  // 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);
  }