code: public void layout (Component comp)
      {
          Graphics2D gfx = (Graphics2D)comp.getGraphics();
          if (gfx != null) {
              layout(gfx);
              gfx.dispose();
          }
      }
docs: Calls {@link #layout(Graphics2D)} with the graphics context for the given component.