ui.update(getComponentGraphics(g2), this);
ui.update(g2, this);
  protected void paintComponent(Graphics g)  {    if (ui != null)      {        Graphics g2 = g;        if (!(g instanceof Graphics2D))          g2 = g.create();        ui.update(getComponentGraphics(g2), this);        if (!(g instanceof Graphics2D))          g2.dispose();      }  }