public void rotate(double theta){
  currentTransform.rotate(theta);
  try {
    writeTransform(new AffineTransform(Math.cos(theta),Math.sin(theta),-Math.sin(theta),Math.cos(theta),0,0));
  }
 catch (  IOException e) {
    handleException(e);
  }
}

public void rotate ( double theta ) { currentTransform . rotate ( theta ) ; try { writeTransform ( new AffineTransform ( Math . cos ( theta ) , Math . sin ( theta ) , - Math . sin ( theta ) , Math . cos ( theta ) , 0 , 0 ) ) ; } catch ( IOException e ) { handleException ( e ) ; } }
rotate the current transform over the z - axis . calls writetransform ( transform ) . rotating with a positive angle theta rotates points on the positive x axis toward the positive y axis .
