MouseListeners not working on my JLayeredPane

I've made a custom slider for selecting power of a shot in a pool game, however when I put the item on JMEDeskop and the action events dont seem to be getting called for some reason heres the class code:


import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

public class GSlider extends JLayeredPane implements MouseMotionListener, MouseListener
{
   private static final long serialVersionUID = 1L;
   // maximum value for slider
    private int max;
    // minimum value for slider
    private int min;
    //the range of values
    private int currentValue;
    //the slider
    private JLabel sliderLabel;
    // the x offset of the image when the slider is at its minimum.
    private final int XOFF = 20;
   
    /**
     * Creates a slider with range 0 to 100 and initial value 50
     * and no image
     *
     * @param icon The image icon to use for the slider
     */   
   
    public GSlider()
    {
       java.net.URL imgURL = null;
       ImageIcon icon = null;
       try{
            imgURL = getClass().getResource("textures/PowerBar.gif");
        }
        catch( Exception e)
        {
            System.err.println(e);
        }
       
        if (imgURL != null) {
            icon = new ImageIcon(imgURL);
        }
       
       this.max = 100;
       this.min = 0;
       this.currentValue = 50;
       
       this.sliderLabel = new JLabel(icon);
       if (icon != null) {
          sliderLabel.setPreferredSize(new Dimension(icon.getIconWidth(),icon.getIconHeight()) );
       }
       else {
          sliderLabel.setPreferredSize(new Dimension(32,150));
          sliderLabel.setOpaque(true);
          sliderLabel.setBackground(Color.BLACK);
       }
       setUp();
    }
   
    public GSlider(ImageIcon icon)
    {
       this.max = 100;
       this.min = 0;
       this.currentValue = 50;
       
       this.sliderLabel = new JLabel(icon);
       if (icon != null) {
          sliderLabel.setPreferredSize(new Dimension(icon.getIconWidth(),icon.getIconHeight()) );
       }
       else {
          System.err.println("Duke icon not found; using black square instead.");
          sliderLabel.setPreferredSize(new Dimension(50,150));
          sliderLabel.setOpaque(true);
          sliderLabel.setBackground(Color.BLACK);
       }
       setUp();
    }
  
    /**
     * @return the current value of the slider.
     */
    public int getValue(){
       return this.currentValue;
    }
   
    /*
     * set up the various components used to make this component.
     */
    private void setUp()
    {
       
       this.setPreferredSize(new Dimension(31, 150));
       this.setSize(31, 150);
       this.setOpaque(true);
       this.setBackground(Color.WHITE);
       this.setLayout(null);
       //this.addMouseListener( this );
       this.addMouseMotionListener(this );
       JPanel edge = new JPanel();
       edge.setPreferredSize(new Dimension(31, 150));
       Insets insets = edge.getInsets();
       Dimension size = edge.getPreferredSize();
       edge.setBounds(insets.right,insets.bottom,size.width, size.height);
       edge.setOpaque(false);
       edge.setBorder(BorderFactory.createLineBorder(Color.black));
       size = sliderLabel.getPreferredSize();
       sliderLabel.setBounds(2+insets.left,insets.top,size.width, size.height);
       sliderLabel.setLocation(sliderLabel.getX(), XOFF+currentValue);
       this.add(edge,new Integer(1));
       this.add(sliderLabel,new Integer(0));
       this.setVisible(true);
    }
      
    /*
     * move the slider image to represent the current value.
     */
   private void moveSlider(MouseEvent e)
   {
      int xpos = e.getY();
      if(xpos < XOFF+min)
         xpos = XOFF+min;
      if(xpos > (this.max+XOFF))
         xpos = this.max+XOFF;
      this.currentValue = xpos-XOFF;
      sliderLabel.setLocation(sliderLabel.getX(), xpos);
   }
   
   /*
    * methods that allows this class to act as a mouselistener
    */
   public void mousePressed(MouseEvent e) {
      moveSlider(e);
    }
    public void mouseReleased(MouseEvent e) {
        moveSlider(e);
    }
    public void mouseEntered(MouseEvent e) {
    }
    public void mouseExited(MouseEvent e) {
    }
    public void mouseClicked(MouseEvent e) {
    }
   /*
    * methods that allows this class to act as a mousemotionlistener
    */
   public void mouseDragged(MouseEvent e) {
      moveSlider(e);
    }
    public void mouseMoved(MouseEvent e) {
    }

}



if anyone can get this to work i'd be gratefull.

sorry i posted an old version, this is a better one (it works in normal JFrames)