calcLayout(g);
calcLayout(g,this.getSize());
    public void paintComponent(Graphics g) {        if (anti_aliased) {            // TODO:            // ( (Graphics2D)g ).setRenderingHint( RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON );        }        if (doc == null) {            return;        }                // if this is the first time painting this document, then calc layout        if (body_box == null) {            calcLayout(g);        }        Context c = newContext((Graphics2D) g);        layout_thread.startRender(c);    }