box.component.paint(c.getGraphics());
    public static void paintBlockContext(Context c, Box box) {        //if (box.getBlockFormattingContext() != null) c.pushBFC(box.getBlockFormattingContext());        c.translate(box.x, box.y);        if (box.getBlockFormattingContext() != null) c.pushBFC(box.getBlockFormattingContext());        //Uu.p("Layout.paintChildren(): " + box);        //Uu.p("child count = " + box.getChildCount());        //XRLog.render(Level.WARNING, "using default renderer paintChildren for " + box.getClass().getName());        //TODO: work out how images and other replaced content really should be handled        /*if (box instanceof InlineBox && box.getChildCount() == 0) {            InlineBox inline = (InlineBox) box;            if (inline.sub_block != null) {                ImageBox imgbox = (ImageBox) inline.sub_block;                ImageRendering.paintComponent(c, imgbox);            } else {                //do nothing??                XRLog.render("Got childless inline box with no sub_block in block rendering context");            }        } else*/        if (box.component != null) {            Point origin = c.getOriginOffset();            box.component.setLocation((int) origin.getX(), (int) origin.getY());            //c.getCanvas().add(cc);            box.component.paint(c.getGraphics());        } else            for (int i = 0; i < box.getChildCount(); i++) {                Box child = (Box) box.getChild(i);                paintChild(c, child);            }        if (box.getBlockFormattingContext() != null) c.popBFC();        c.translate(-box.x, -box.y);        //if (box.getBlockFormattingContext() != null) c.popBFC();    }