Hi there,
 
I'm got a complex layout with a Box inside a Jscrollpane.  I want to let the user type into a textArea and then add what they typed to the top of the view, above where the cursor is.  However, when I call revalidate() to update the display, it repositions the scrollpane to the top, so the cursor is off-screen.
 
I can reposition the scrollpane by calling setViewPosition() on it's viewport.  However, it tends to redraw the screen AFTER I do this, putting it into position for a split second and then redrawing down from the top. 
 
What I need is a way to add components to the Box and then tell the Layout Manager to re-layout the components, and recalculate the viewport position without repainting them.  Then paint them ONCE in the correct location.  Does anyone know how this can be done?
 
Thanks in advance!
James Brundege
 
 

Reply via email to