private void accept(){
        if (verifyAddress(Adress.getText())){
            if (port.getText().matches("[0-9]+") && port.getText().length() > 0){
                    if(!Adress.getText().trim().equals("")){
                        try {
                            catalogue.setNameServer(InetAddress.getByName(Adress.getText()), Integer.parseInt(port.getText()));
                            catalogue.setName(nick.getText());
                        } catch (UnknownHostException e1) {
                            e1.printStackTrace();
                        }
                        if(Manualconnect.isSelected()){
                            Gui = new startGui(true,Adress.getText(),Integer.parseInt(port.getText()));
                        }
                        else{
                            Gui = new startGui(false,Adress.getText(),Integer.parseInt(port.getText()));
                        }
                        catalogue.setGui(Gui);
                        frame1.dispose();
                    }
                }
            }
            else {
                label.setText("  Invalid port number");
            }

    }