protected void paintHorizontalLabel(Graphics g,int value,Component label){
  int labelCenter=xPositionForValue(value);
  int labelLeft=labelCenter - (label.getPreferredSize().width / 2);
  g.translate(labelLeft,0);
  label.paint(g);
  g.translate(-labelLeft,0);
}

protected void paintHorizontalLabel ( Graphics g , int value , Component label ) { int labelCenter = xPositionForValue ( value ) ; int labelLeft = labelCenter - ( label . getPreferredSize ( ) . width / 2 ) ; g . translate ( labelLeft , 0 ) ; label . paint ( g ) ; g . translate ( - labelLeft , 0 ) ; }
called for every label in the label table . used to draw the labels for horizontal sliders . the graphics have been translated to labelrect . y already .
