code: private void initialize() {
      this.setSize(300, 200);
      this.setTitle("Connect");
      this.setContentPane(getJContentPane());
      this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
      this.addWindowListener(new WindowAdapter() {
        public void windowClosed(WindowEvent e) {
          cancelTimeout();
        }
      });
  
      Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener() {
        public void eventDispatched(AWTEvent e) {
          if ((e instanceof KeyEvent && ((KeyEvent) e).getID() == KeyEvent.KEY_PRESSED)
              || (e instanceof MouseEvent && ((MouseEvent) e).getID() == MouseEvent.MOUSE_PRESSED)) {
            if (ConnectionDialog.this.isAncestorOf(((ComponentEvent) e).getComponent())) {
              cancelTimeout();
            }
          }
        }
      }, AWTEvent.KEY_EVENT_MASK | AWTEvent.MOUSE_EVENT_MASK);
      restore();
    }
docs: This method initializes this
  
  @return void