private void drawXTick(Graphics grahics){
  grahics.setFont(scale.getFont());
  for (int i=0; i < tickLabelPositions.size(); i++) {
    if (tickVisibilities.get(i) == true) {
      String text=tickLabels.get(i);
      int fontWidth=FigureUtilities.getTextExtents(text,getFont()).width;
      int x=(int)Math.ceil(tickLabelPositions.get(i) - fontWidth / 2.0);
      grahics.drawText(text,x,0);
    }
  }
}

private void drawXTick ( Graphics grahics ) { grahics . setFont ( scale . getFont ( ) ) ; for ( int i = 0 ; i < tickLabelPositions . size ( ) ; i ++ ) { if ( tickVisibilities . get ( i ) == true ) { String text = tickLabels . get ( i ) ; int fontWidth = FigureUtilities . getTextExtents ( text , getFont ( ) ) . width ; int x = ( int ) Math . ceil ( tickLabelPositions . get ( i ) - fontWidth / 2.0 ) ; grahics . drawText ( text , x , 0 ) ; } } }
draw the x tick .
