@Override
    public void mouseReleased(MouseEvent e) {

        int x = e.getX();
        int y = e.getY();
        
        for (int i = 0; i < selection.length; ++i) {
            if (selection[i].contains(x, y)) {
               if(i == 0)
               {
                   frame.dispose();
                   clip.close();
                   try {
                       new StartGame().start(new Pacman());
                   } catch (FileNotFoundException ex) { }
                   break;
               }
               if ( i == 1)
                {
                   System.out.println("second");
                   break;
               }  
               if ( i == 2)
                {
                   System.exit(0);
                   break;
               } 
               
            }

        }
    }