@Override
                public void actionPerformed(ActionEvent e) {
                    if (choice == CHATFONT) {
                        chatFont = ffList.getSelectedValue();
                        chatFontSize = sizeList.getSelectedValue();
                        chatFontStyle = fsList.getSelectedValue();

                        try {
                            prop.load(new FileInputStream("config.properties"));
                            prop.setProperty("chatFont", chatFont);
                            prop.setProperty("chatFontSize", String.valueOf(chatFontSize));
                            prop.setProperty("chatFontStyle", chatFontStyle);
                            prop.store(new FileOutputStream("config.properties"), null);
                        } catch (IOException e1) {
                            e1.printStackTrace();
                        }

                        setStyles();
                    }
                    else //choice == NICKLISTFONT
                    {
                        userListFont = ffList.getSelectedValue();
                        userListFontSize = sizeList.getSelectedValue();
                        userListFontStyle = fsList.getSelectedValue();

                        try {
                            prop.load(new FileInputStream("config.properties"));
                            prop.setProperty("userListFont", userListFont);
                            prop.setProperty("userListFontSize", String.valueOf(userListFontSize));
                            prop.setProperty("userListFontStyle", userListFontStyle);
                            prop.store(new FileOutputStream("config.properties"), null);
                        } catch (IOException e1) {
                            e1.printStackTrace();
                        }
                        Font font;
                        switch (style) {
                            case "Bold":
                                font = new Font(fontName, Font.BOLD, size);
                                break;
                            case "Italic":
                                font = new Font(fontName, Font.ITALIC, size);
                                break;
                            case "Bold Italic":
                                font = new Font(fontName, Font.ITALIC | Font.BOLD, size);
                                break;
                            default:
                                font = new Font(fontName, Font.PLAIN, size);
                                break;
                        }
                        fontField.setFont(font);
                        fontField.setText(font.getFamily()+" "+font.getSize());

                        setStyles();
                    }
                    fontDialog.dispose();
                }