ComponentPeer parentPeer = parent.getPeer(); Graphics g = parentPeer.getGraphics();
Graphics g = parent.getGraphics();
  public Graphics getGraphics()  {    Component parent = awtComponent.getParent();    ComponentPeer parentPeer = parent.getPeer();    Graphics g = parentPeer.getGraphics();    g.translate(awtComponent.getX(), awtComponent.getY());    g.setClip(0, 0, awtComponent.getWidth(), awtComponent.getHeight());    return g;  }