@@ -0,0 +1,3630 @@
+package com.nigorojr.typebest;%0A%0Aimport java.awt.Dialog.ModalityType;%0Aimport java.awt.GridLayout;%0Aimport java.awt.event.ActionEvent;%0Aimport java.awt.event.ActionListener;%0A%0Aimport javax.swing.JButton;%0Aimport javax.swing.JComboBox;%0Aimport javax.swing.JDialog;%0Aimport javax.swing.JPanel;%0A%0Apublic class ChangeColor extends JDialog %7B%0A    public ChangeColor() %7B%0A        final JDialog dialog = new JDialog();%0A        dialog.setTitle(%22Change color of%22);%0A        dialog.setLocationRelativeTo(null);%0A        dialog.setSize(190, 70);%0A        dialog.setLayout(new GridLayout(0, 1));%0A%0A        // Ask which color the user wants to change%0A        final String%5B%5D choices = %7B %22Untyped Letters%22, %22Typed Letters%22,%0A                %22Misstypes%22, %22Background%22 %7D;%0A        final JComboBox choose = new JComboBox(choices);%0A%0A        JPanel buttons = new JPanel() %7B%0A            %7B%0A                final ActionListener click = new ActionListener() %7B%0A                    @Override%0A                    public void actionPerformed(ActionEvent e) %7B%0A                        if (e.getActionCommand().equals(%22OK%22)) %7B%0A                            dialog.setVisible(false);%0A                            String choice = (String) choose.getSelectedItem();%0A                            // Change the selected%0A                            Color selected;%0A                            if (choice.equals(choices%5B0%5D)%0A                                    && (selected = ColorSelector%0A                                            .chooseColor(user%0A                                                    .getSettings()%0A                                                    .getToBeTyped())) != null)%0A                                user.getSettings().setToBeTyped(selected);%0A                            else if (choice.equals(choices%5B1%5D)%0A                                    && (selected = ColorSelector%0A                                            .chooseColor(user%0A                                                    .getSettings()%0A                                                    .getAlreadyTyped())) != null)%0A                                user.getSettings().setAlreadyTyped(selected);%0A                            else if (choice.equals(choices%5B2%5D)%0A                                    && (selected = ColorSelector%0A                                            .chooseColor(user%0A                                                    .getSettings()%0A                                                    .getMissTypeColor())) != null)%0A                                user.getSettings().setMissTypeColor(selected);%0A                            else if (choice.equals(choices%5B3%5D)%0A                                    && (selected = ColorSelector%0A                                            .chooseColor(user.getSettings()%0A                                                    .getBackgroundColor())) != null)%0A                                user.getSettings().setBackgroundColor(selected);%0A                        %7D%0A                        else if (e.getActionCommand().equals(%22Cancel%22))%0A                            dialog.setVisible(false);%0A                    %7D%0A                %7D;%0A                this.add(new JButton(%22OK%22) %7B%0A                    %7B%0A                        this.addActionListener(click);%0A                    %7D%0A                %7D);%0A                this.add(new JButton(%22Cancel%22) %7B%0A                    %7B%0A                        this.addActionListener(click);%0A                    %7D%0A                %7D);%0A            %7D%0A        %7D;%0A%0A        dialog.add(choose);%0A        dialog.add(buttons);%0A%0A        dialog.setModalityType(ModalityType.DOCUMENT_MODAL);%0A        dialog.setVisible(true);%0A    %7D%0A%7D%0A

Add ChangeColor class