String prop; String value;
String httpserver = httpProxyServerTextField.getText().trim(); int httpport = -1;
    private void applyButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_applyButtonActionPerformed        String prop;        String value;        try {            String server = httpProxyServerTextField.getText().trim();            String port = httpProxyPortTextField.getText().trim();            value = server + ":" + port;            prop = "WebScarab.httpProxy";            if (!server.equals("") && !port.equals("")) {                int p = Integer.parseInt(port);                if (!value.equals(_props.getProperty(prop))) {                    _props.setProperty(prop,value);                }            } else if (port.equals("") && !server.equals("")) {                System.err.println("The http Proxy port must also be provided");                return;            } else if (server.equals("") && !port.equals("")) {                System.err.println("The http Proxy server must also be provided");                return;            } else {                if (!_props.getProperty(prop).equals("")) {                    _props.setProperty(prop, "");                }            }        } catch (NumberFormatException nfe) {            System.err.println("Error parsing the upstream HTTP Proxy port");            return;        }                try {            String server = httpsProxyServerTextField.getText().trim();            String port = httpsProxyPortTextField.getText().trim();            value = server + ":" + port;            prop = "WebScarab.httpsProxy";            if (!server.equals("") && !port.equals("")) {                int p = Integer.parseInt(port);                if (!value.equals(_props.getProperty(prop))) {                    _props.setProperty(prop,value);                }            } else if (port.equals("") && !server.equals("")) {                System.err.println("The https Proxy port must also be provided");                return;            } else if (server.equals("") && !port.equals("")) {                System.err.println("The https Proxy server must also be provided");                return;            } else {                if (!_props.getProperty(prop).equals("")) {                    _props.setProperty(prop, "");                }            }        } catch (NumberFormatException nfe) {            System.err.println("Error parsing the upstream HTTPS Proxy port");            return;        }                value = noProxyTextArea.getText();        prop = "WebScarab.noProxy";        if (!value.equals(_props.getProperty(prop))) {            _props.setProperty(prop,value);        }                this.closeDialog(new WindowEvent(this,WindowEvent.WINDOW_CLOSED));    }//GEN-LAST:event_applyButtonActionPerformed