frame.dispose();
                                public void actionPerformed(ActionEvent event) {                                    desktop.setBackground(colorChooser.getColor());                                    frame.setVisible(false);                                }