public static void paintComponent(Graphics g, Component c, Container p, Rectangle r) { paintComponent(g, c, p, r.x, r.y, r.width, r.height);
public static void paintComponent(Graphics g, Component c, Container p, int x, int y, int w, int h) { Container parent = c.getParent(); if (parent != null) parent.remove(c); if (p != null) p.add(c);  Shape savedClip = g.getClip();  g.setClip(x, y, w, h); g.translate(x, y);  c.paint(g);  g.translate(-x, -y); g.setClip(savedClip);
  public static void paintComponent(Graphics g, Component c,                                     Container p, Rectangle r)  {    paintComponent(g, c, p, r.x, r.y, r.width, r.height);  }