@Override
    public void setVisible(boolean b) {
        if (b) {
            serverTextField.setText(Config.getInstance().getHost());
            int port = Config.getInstance().getPort();
            if (port == 0) {
                portTextField.setText("");
            } else {
                portTextField.setText(Integer.toString(Config.getInstance().getPort()));
            }
            userTextField.setText(Config.getInstance().getRpcUser());
            passwordTextField.setText(Config.getInstance().getRpcPass());
            updateIntervalSpinner.setValue(Config.getInstance().getUpdateInterval());
        }
        super.setVisible(b);
    }