public void actionPerformed(ActionEvent actionEvent) {
                    try {
                        prop.load(new FileInputStream("config.properties"));


                        for (int i = 0; i < ct.length; i++) {
                            String rgb = Integer.toHexString(ct[i].getBackground().getRGB()).substring(1);
                            prop.setProperty("CTCP"+String.valueOf(i), "#"+rgb);
                        }

                        for (int i = 0; i < cb.length; i++) {
                            String rgb = Integer.toHexString(cb[i].getBackground().getRGB()).substring(1);
                            prop.setProperty("chatColor"+String.valueOf(i), "#"+rgb);
                        }

                        prop.setProperty("awayMessage", awayMessageText.getText());
                        prop.setProperty("quitMessage", quitMessageText.getText());
                        prop.setProperty("leaveMessage", leaveMessageText.getText());

                        if (tabPlacementOption.getSelectedItem().equals("Bottom")) prop.setProperty("tabPlacement", String.valueOf(DnDTabbedPane.BOTTOM));
                        else prop.setProperty("tabPlacement", String.valueOf(DnDTabbedPane.TOP));

                        prop.setProperty("chatNameColors", String.valueOf(coloredNicksOption.isSelected()));
                        prop.setProperty("hideJoinPartQuitNotifications", String.valueOf(hideMessagesOption.isSelected()));
                        prop.setProperty("showTimestamp", String.valueOf(showTimestampsOption.isSelected()));
                        prop.setProperty("disableTabNotificationsGlobally", String.valueOf(disableChatNotificationsOption.isSelected()));
                        prop.setProperty("focusNewTab", String.valueOf(focusNewTabOption.isSelected()));
                        prop.setProperty("sortTabsAlphabetically", String.valueOf(sortTabsAlphabeticallyOption.isSelected()));

                        prop.store(new FileOutputStream("config.properties"), null);

                        loadProperties();
                        setStyles();

                        dialog.dispose();

                    } catch (FileNotFoundException e1) {
                        e1.printStackTrace();
                    } catch (IOException e1) {
                        e1.printStackTrace();
                    }

                }