if (box.getBlockFormattingContext() != null) {
if (box.getPersistentBFC() != null) {
    public static void paintBlockContext(Context c, Box box, boolean restyle) {        //if (box.getBlockFormattingContext() != null) c.pushBFC(box.getBlockFormattingContext());        c.translate(box.x, box.y);        if (box.getBlockFormattingContext() != null) {            c.pushBFC(box.getBlockFormattingContext());        }        //XRLog.render(Level.WARNING, "using default renderer paintChildren for " + box.getClass().getPropertyName());        //TODO: work out how images and other replaced content really should be handled        if (box.component != null) {            //HACK: the positions during layout are still not perfect, reset here - tobe 2005-01-07            //TODO: fix the translates during layout to handle this directly instead            Point origin = c.getOriginOffset();            box.component.setLocation((int) origin.getX(), (int) origin.getY());            if (! c.isInteractive()) {                box.component.paint(c.getGraphics());            }        } else {            for (int i = 0; i < box.getChildCount(); i++) {                LinkedList inlineBorders = null;                Box child = (Box) box.getChild(i);                if (!(child instanceof AnonymousBlockBox)) {                    //save inline borders and reconstitute them                    inlineBorders = (LinkedList) c.getInlineBorders().clone();                    c.getInlineBorders().clear();                }                paintChild(c, child, restyle);                if (!(child instanceof AnonymousBlockBox)) {                    c.getInlineBorders().addAll(inlineBorders);                }            }        }        if (box.getBlockFormattingContext() != null) {            c.popBFC();        }        c.translate(-box.x, -box.y);        //if (box.getBlockFormattingContext() != null) c.popBFC();    }