For Programmers: Free Programming Magazines  


Home > Archive > Java Help > January 2008 > Scrolling in a JEditorPane









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 in a JEditorPane
Daniel S.

2008-01-22, 7:37 pm

Hello, I am new to the group, so please forgive me if this has already been
asked.

I have a JEditorPane. and a custom routine to append HTML text to it, but I
wish to have it automatically scroll down when I add text that doesn't fit
on the screen. So far I have not found a way to do this. Can someone
possibly help me?

Thanks in advance

Daniel
lin

2008-01-22, 7:37 pm

you can use JScrollPane and set "autoscrolls" true

---------------
"Daniel S." <squirrelhavoc(takeout)@(takeout)yahoo.com> 写入消息新闻:Xns9A2D7F1566BD9squirrelhav
octakeout@69.28.173.184...
> Hello, I am new to the group, so please forgive me if this has already
> been
> asked.
>
> I have a JEditorPane. and a custom routine to append HTML text to it, but
> I
> wish to have it automatically scroll down when I add text that doesn't fit
> on the screen. So far I have not found a way to do this. Can someone
> possibly help me?
>
> Thanks in advance
>
> Daniel



Roedy Green

2008-01-22, 7:37 pm

On Wed, 23 Jan 2008 02:40:49 +0800, "lin" <hankes_garden@163.com>
wrote, quoted or indirectly quoted someone who said :

>you can use JScrollPane and set "autoscrolls" true


see http://mindprod.com/jgloss/jscrollpane.html
--
Roedy Green, Canadian Mind Products
The Java Glossary, http://mindprod.com
Squirrel Havoc

2008-01-22, 7:37 pm

Roedy Green <see_website@mindprod.com.invalid> wrote in
news:6ohcp3djf7f3r7fpjlokd40ccc8bpijqvk@
4ax.com:

> On Wed, 23 Jan 2008 02:40:49 +0800, "lin" <hankes_garden@163.com>
> wrote, quoted or indirectly quoted someone who said :
>
>
> see http://mindprod.com/jgloss/jscrollpane.html


Thank you to both of you, after some research on both scroll panes and the
given URL, I believe I have gotten it to work.

Thanks again
Sponsored Links







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

Copyright 2008 codecomments.com