Rectangle rect = (Rectangle) a;  getStyleSheet().getBoxPainter(getAttributes()).paint(g, rect.x, rect.y, rect.width, rect.height, this);
Rectangle rect = a instanceof Rectangle ? (Rectangle) a : a.getBounds();      painter.paint(g, rect.x, rect.y, rect.width, rect.height, this);
  public void paint(Graphics g, Shape a)  {    Rectangle rect = (Rectangle) a;    // FIXME: not fully implemented    getStyleSheet().getBoxPainter(getAttributes()).paint(g, rect.x, rect.y,                                                         rect.width,                                                         rect.height, this);    super.paint(g, a);  }