private void createActionListeners() {

                // action listeners for the "Start" button on the start screen
                startGame.addActionListener(new ActionListener() {
                        @Override
                        public void actionPerformed(ActionEvent e) {
                                while (lpane.getComponent(0) != gamePanel) {
                                        lpane.setLayer(lpane.getComponent(0), -1);
                                }

                                final class Worker implements Runnable {
                                        public void run() {
                                                Engine.engine.play();
                                        }
                                }
                                Thread thread = new Thread(new Worker());
                                thread.setDaemon(true);
                                thread.start();
                                gui.paint(gui.getGraphics());
                                controlPanel.paint(controlPanel.getGraphics());
                        }
                });

                // action listeners for the "Exit" button on the start screen
                exitGame1.addActionListener(new ActionListener() {
                        @Override
                        public void actionPerformed(ActionEvent e) {
                                System.exit(0);
                        }
                });

                // action listeners for the "Enter" button on the game screen
                enter.addActionListener(new ActionListener() {
                        @Override
                        public void actionPerformed(ActionEvent e) {
                                double minv = Math.log(50);
                                double maxv = Math.log(750);
                                double scale = (maxv - minv) / (100);
                                Engine.speed = (int) Math.exp(minv + scale * (Math.abs(slider.getValue())));
                        }
                });

                // action listeners for the "Exit" button on the game screen
                exitGame2.addActionListener(new ActionListener() {
                        @Override
                        public void actionPerformed(ActionEvent e) {
                                System.exit(0);
                        }
                });

                // action listeners that allow the enter button to start the
                // game
                infoPanel.addKeyListener(new KeyAdapter() {
                        @Override
                        public void keyPressed(KeyEvent e) {
                                if (e.getKeyCode() == KeyEvent.VK_ENTER) {
                                        while (lpane.getComponent(0) != gamePanel) {
                                                lpane.setLayer(lpane.getComponent(0), -1);
                                        }

                                        final class Worker implements Runnable {
                                                public void run() {
                                                        Engine.engine.play();
                                                }
                                        }
                                        Thread thread = new Thread(new Worker());
                                        thread.setDaemon(true);
                                        thread.start();
                                        gui.paint(gui.getGraphics());
                                        controlPanel.paint(controlPanel.getGraphics());
                                }
                        }
                });
        }