desktop.setBackground(color_chooser.getColor());
desktop.setBackground(colorChooser.getColor());
    public void run() {        SwingUtilities.invokeLater(new Runnable() {            public void run() {                final ClassLoader cl = getClass().getClassLoader();                final ExtensionPoint appsEP;                if (cl instanceof PluginClassLoader) {                    appsEP = ((PluginClassLoader) cl).getDeclaringPluginDescriptor().getExtensionPoint("apps");                } else {                    throw new AWTError("Need to be loaded using a plugin classloader");                }                Desktop.this.taskBar = new TaskBar(appsEP);                final JNodeToolkit tk = JNodeToolkit.getJNodeToolkit();                final JNodeAwtContext ctx = tk.getAwtContext();                final JDesktopPane desktop = ctx.getDesktop();                final Container awtRoot = ctx.getAwtRoot();                                taskBar.startButton.addActionListener(new ActionListener() {                    public void actionPerformed(ActionEvent event) {                        if (taskBar.startMenu.isShowing()) {                            taskBar.startMenu.setVisible(false);                        } else {                            Point p = taskBar.startButton.getLocationOnScreen();                            int h = taskBar.startMenu.getPreferredSize().height;                            taskBar.startMenu.show(desktop, 0, p.y - h);                        }                    }                });                taskBar.quitMI.addActionListener(new ActionListener() {                    public void actionPerformed(ActionEvent e) {                        taskBar.startMenu.setVisible(false);                        JNodeToolkit.stopGui();                    }                });                taskBar.haltMI.addActionListener(new ActionListener() {                    public void actionPerformed(ActionEvent e) {                        JNodeToolkit.stopGui();                        VmSystem.halt(false);                    }                });                taskBar.restartMI.addActionListener(new ActionListener() {                    public void actionPerformed(ActionEvent e) {                        JNodeToolkit.stopGui();                        VmSystem.halt(true);                    }                });                ActionListener desktopColorAction = new ActionListener() {                    private JFrame f;                    private Color oldColor;                    public void actionPerformed(ActionEvent e) {                        if (f == null) {                            f = new JFrame("Desktop color");                            final JColorChooser color_chooser = new JColorChooser();                            f.add(color_chooser, BorderLayout.CENTER);                            JButton ok = new JButton("OK");                            ok.addActionListener(new ActionListener() {                                public void actionPerformed(ActionEvent event) {                                    desktop.setBackground(color_chooser.getColor());                                    f.setVisible(false);                                }                            });                            JButton apply = new JButton("Apply");                            apply.addActionListener(new ActionListener() {                                public void actionPerformed(ActionEvent event) {                                    desktop.setBackground(color_chooser.getColor());                                }                            });                            JButton cancel = new JButton("Cancel");                            cancel.addActionListener(new ActionListener() {                                public void actionPerformed(ActionEvent event) {                                    desktop.setBackground(oldColor);                                    f.setVisible(false);                                }                            });                            JPanel buttons = new JPanel();                            buttons.add(ok);                            buttons.add(apply);                            buttons.add(cancel);                            f.add(buttons, BorderLayout.SOUTH);                        }                        oldColor = desktop.getBackground();                        Dimension ss = Toolkit.getDefaultToolkit().getScreenSize();                        int x = (ss.width - 500) / 2;                        int y = (ss.height - 400) / 2;                        f.setSize(500, 400);                        f.setVisible(true);                        f.setLocation(x, y);                    }                };                taskBar.desktopColorMI.addActionListener(desktopColorAction);                class ChangeScreenResolution implements ActionListener, Runnable {                    private String resolution;                    public ChangeScreenResolution(String resolution) {                        this.resolution = resolution;                    }                    public void run() {                        ((JNodeToolkit) Toolkit.getDefaultToolkit()).changeScreenSize(resolution);                        AccessController.doPrivileged(new SetPropertyAction("jnode.awt.screensize", resolution));                    }                    public void actionPerformed(ActionEvent event) {                        SwingUtilities.invokeLater(this);                    }                }                taskBar.changeResMI1.addActionListener(new ChangeScreenResolution("640x480/32"));                taskBar.changeResMI2.addActionListener(new ChangeScreenResolution("800x600/32"));                taskBar.changeResMI3.addActionListener(new ChangeScreenResolution("1024x768/32"));                taskBar.changeResMI4.addActionListener(new ChangeScreenResolution("1280x1024/32"));                awtRoot.removeAll();                awtRoot.setLayout(new BorderLayout());                final int controlBarHeight = 36;                final int w = awtRoot.getWidth();                taskBar.setPreferredSize(new Dimension(w, controlBarHeight));                                awtRoot.add(taskBar, BorderLayout.SOUTH);        		Image background = null;//loadImage("button_red_i_like.png");        		if(background != null)        		{        			System.err.println("IMAGE FOUND");        			awtRoot.add(new JLabel(new ImageIcon(background)), BorderLayout.CENTER);        		}        		else        		{        			System.err.println("IMAGE NOT FOUND");        			awtRoot.add(desktop, BorderLayout.CENTER);        		}                                awtRoot.invalidate();                awtRoot.repaint();                // Update desktopmanager                desktop.setDesktopManager(new DesktopManagerImpl());                desktop.addContainerListener(new DesktopContainerListener());                final JPopupMenu desktopMenu = new JPopupMenu("Desktop settings");                JMenuItem desktopColor = new JMenuItem("Desktop color");                desktopColor.addActionListener(desktopColorAction);                desktopMenu.add(desktopColor);                desktopMenu.add(taskBar.changeResMI1);                desktopMenu.add(taskBar.changeResMI2);                desktopMenu.add(taskBar.changeResMI3);                desktopMenu.add(taskBar.changeResMI4);                desktop.addMouseListener(new MouseAdapter() {                    public void mousePressed(MouseEvent event) {                        if(event.getButton() == MouseEvent.BUTTON2){                            if (desktopMenu .isShowing()) {                                desktopMenu .setVisible(false);                            } else {                                desktopMenu.show(desktop, event.getX(), event.getY());                            }                        }                    }                });                // Update                desktop.doLayout();                desktop.repaint();            }        });    }