/** * Renders using the given rendering surface and area on that surface. The view may need to do * layout and create child views to enable itself to render into the given allocation. * * @param g the rendering surface to use * @param a the allocated region to render into * @see View#paint */ public void paint(Graphics g, Shape a) { Rectangle r = (Rectangle) a; g.clipRect(r.x, r.y, r.width, r.height); super.paint(g, a); }