addWindowListener(new WindowCloser(this, true));
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    public JColorDemo() {        super("Swing Color Demo");		Container cp = getContentPane();        JButton jButton;        cp.add(BorderLayout.NORTH, jButton = new JButton("Change Color..."));		jButton.setToolTipText("Click here to see the Color Chooser");        jButton.addActionListener(new ActionListener() {			public void actionPerformed(ActionEvent actionEvent)			{				Color ch = JColorChooser.showDialog(					JColorDemo.this,				// parent					"Swing Demo Color Popup",	// title					getBackground());			// defaultSystem.out.println(ch);				if (ch != null) {					demo.setBackground(ch);					demo.repaint();				}			}		});        cp.add(BorderLayout.CENTER, demo = 			new JLabel("Your One True Color", JLabel.CENTER));		demo.setToolTipText("This is the last color you chose");        pack();        addWindowListener(new WindowCloser(this, true));	}