getContext().setExtents( new Rectangle( 200, 200 ) );
getContext().setExtents( new Rectangle( getWidth(), getHeight() ) );
    private void newContext( Graphics g ) {        //u.p("new context begin");        //Point origin = new Point( 0, 0 );        //Point last = new Point( 0, 0 );        getContext().canvas = this;        getContext().graphics = g;        // set up the dimensions of the html canvas        //Rectangle dimensions = new Rectangle(this.getWidth(),this.getHeight());//layout.bwidth, layout.bheight);        //c.canvas_graphics = g.create();        //c.setExtents(new Rectangle(0,0,this.getWidth(),this.getHeight()));        //u.p("viewport size = " + viewport.getSize());        if ( enclosingScrollPane != null ) {            Rectangle bnds = enclosingScrollPane.getViewportBorderBounds();            getContext().setExtents( new Rectangle( 0,0, bnds.width, bnds.height) );        } else {            getContext().setExtents( new Rectangle( 200, 200 ) );        }        //getContext().setExtents(new Rectangle(0,0,viewport.getWidth(),viewport.getHeight()));        getContext().viewport = this.enclosingScrollPane;        //getContext().cursor = last;        getContext().setMaxWidth( 0 );        //u.p("new context end");        //u.p("c = " + c);    }