For Programmers: Free Programming Magazines  


Home > Archive > Java Help > October 2006 > Scrolling









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Scrolling
Paul Thompson

2006-10-23, 10:04 pm

I have a JTextArea associated with a JScrollPort, and everything works
fine except the end of the text is initially displayed. How do I
reposition the view to the beginning?

Thanks
Paul
Knute Johnson

2006-10-23, 10:04 pm

Paul Thompson wrote:
> I have a JTextArea associated with a JScrollPort, and everything works
> fine except the end of the text is initially displayed. How do I
> reposition the view to the beginning?
>
> Thanks
> Paul


JTextComponent.setCaretPosition(0);

--

Knute Johnson
email s/nospam/knute/
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com