public void setPosition(int p)
  {
      position = p;
      //set image
      if (position == 1 || position == 2)
          imageName = "paddleHor.png";
      else if (position == 3 || position == 4)
          imageName = "paddleVer.png";
      image = new ImageIcon(this.getClass()
              .getResource(imageName)).getImage();
      width = image.getWidth(null);
      heigth = image.getHeight(null);
      resetState();
  }