public void paintGraph(Graphics g){
  if (graphComponent != null) {
    Graphics2D g2=(Graphics2D)g;
    AffineTransform tx=g2.getTransform();
    try {
      g2.translate(translate.x,translate.y);
      g2.scale(scale,scale);
      graphComponent.paintGraph(g2,drawLabels);
    }
  finally {
      g2.setTransform(tx);
    }
  }
}

public void paintGraph ( Graphics g ) { if ( graphComponent != null ) { Graphics2D g2 = ( Graphics2D ) g ; AffineTransform tx = g2 . getTransform ( ) ; try { g2 . translate ( translate . x , translate . y ) ; g2 . scale ( scale , scale ) ; graphComponent . paintGraph ( g2 , drawLabels ) ; } finally { g2 . setTransform ( tx ) ; } } }
paints the graph outline .
