Graphics g2 = g.create(); g2.setFont(this.getFont()); g2.setColor(this.getForeground());
if (g instanceof Graphics2D) { g.setFont (this.getFont()); g.setColor (this.getForeground()); return g; } else { Graphics g2 = g.create (); g2.setFont (this.getFont()); g2.setColor (this.getForeground());
	protected  Graphics getComponentGraphics(Graphics g)  {        Graphics g2 = g.create();    g2.setFont(this.getFont());    g2.setColor(this.getForeground());    return g2;  }