@Override
                public void actionPerformed(ActionEvent e) {
                    try {
                        Connection.real = realNameField.getText().trim();
                        Connection.nicks[0] = nameField.getText().trim();
                        Connection.nicks[1] = secondNameField.getText().trim();
                        Connection.nicks[2] = thirdNameField.getText().trim();

                        prop.load(new FileInputStream("config.properties"));
                        prop.setProperty("Real", Connection.real);
                        prop.setProperty("Nick", Connection.nicks[0]);
                        prop.setProperty("Second", Connection.nicks[1]);
                        prop.setProperty("Third", Connection.nicks[2]);
                        prop.store(new FileOutputStream("config.properties"), null);

                    } catch (IOException io) {
                        Logger.getLogger(GUI.class.getName()).log(Level.SEVERE, null, io);
                    }
                    dialog.dispose();
                }