proxySettings.setPort(Integer.parseInt(port.getText()));
String tmpPort = port.getText(); if (tmpPort.length()==0){ proxySettings.setPort(-1); } else{ proxySettings.setPort(Integer.parseInt(tmpPort)); }
    public ProxySettings getProxySettings() {        if (dirty){            proxySettings.setUse(use.isSelected());            proxySettings.setHost(host.getText());            proxySettings.setPort(Integer.parseInt(port.getText()));            proxySettings.setUserpass(user.getText(), passwort.getText());        }        return proxySettings;    }