this.closeDialog(new WindowEvent(this,WindowEvent.WINDOW_CLOSED));
setVisible(false); dispose();
    private void applyButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_applyButtonActionPerformed        String httpserver = httpProxyServerTextField.getText().trim();        int httpport = -1;        try {            String p = httpProxyPortTextField.getText().trim();            if (!p.equals(""))                 httpport = Integer.parseInt(p);            // FIXME check that the port is acceptable (1..65535)        } catch (NumberFormatException nfe) {            _logger.severe("Error parsing the upstream HTTP Proxy port");            return;        }                String httpsserver = httpsProxyServerTextField.getText().trim();        int httpsport = -1;        try {            String p = httpsProxyPortTextField.getText().trim();            if (!p.equals(""))                httpsport = Integer.parseInt(p);            // FIXME check that the port is acceptable (1..65535)        } catch (NumberFormatException nfe) {            _logger.severe("Error parsing the upstream HTTPS Proxy port");            return;        }                String[] noproxies = noProxyTextArea.getText().trim().split(" *, *");                boolean running = _framework.isRunning();        if (running) {            if (_framework.isBusy()) {                String[] status = _framework.getStatus();                JOptionPane.showMessageDialog(this, status, "Error - plugins are busy", JOptionPane.ERROR_MESSAGE);                return;            }            _framework.stopPlugins();        }        _factory.setHttpProxy(httpserver, httpport);        _factory.setHttpsProxy(httpsserver, httpsport);        _factory.setNoProxy(noproxies);        if (running) {            _framework.startPlugins();        }                _props.setProperty("WebScarab.httpProxy", httpserver+":"+httpport);        _props.setProperty("WebScarab.httpsProxy", httpsserver+":"+httpsport);        _props.setProperty("WebScarab.noProxy", noProxyTextArea.getText());                this.closeDialog(new WindowEvent(this,WindowEvent.WINDOW_CLOSED));    }//GEN-LAST:event_applyButtonActionPerformed