public JRangeSlider(BoundedRangeModel model,int orientation,int direction){
  super.setFocusable(true);
  this.model=model;
  this.orientation=orientation;
  this.direction=direction;
  setForeground(Color.LIGHT_GRAY);
  this.lstnr=createListener();
  model.addChangeListener(lstnr);
  addMouseListener(this);
  addMouseMotionListener(this);
  addKeyListener(this);
}

public JRangeSlider ( BoundedRangeModel model , int orientation , int direction ) { super . setFocusable ( true ) ; this . model = model ; this . orientation = orientation ; this . direction = direction ; setForeground ( Color . LIGHT_GRAY ) ; this . lstnr = createListener ( ) ; model . addChangeListener ( lstnr ) ; addMouseListener ( this ) ; addMouseMotionListener ( this ) ; addKeyListener ( this ) ; }
create a new range slider .
