protected void drawProjectionBackground(Graphics g){
  if (g instanceof Graphics2D) {
    projection.drawBackground((Graphics2D)g,getBckgrnd());
  }
 else {
    g.setColor(getBackground());
    projection.drawBackground(g);
  }
}

protected void drawProjectionBackground ( Graphics g ) { if ( g instanceof Graphics2D ) { projection . drawBackground ( ( Graphics2D ) g , getBckgrnd ( ) ) ; } else { g . setColor ( getBackground ( ) ) ; projection . drawBackground ( g ) ; } }
convenience method to test if graphics is graphics2d object , and to try to do the right thing .
