p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Java GUI (http://p2p.wrox.com/forumdisplay.php?f=115)
-   -   scrolling scrollpane (http://p2p.wrox.com/showthread.php?t=12340)

philip April 27th, 2004 01:38 PM

scrolling scrollpane
 
ive got the opposite problem to natmaster.
i am using a JEditorPane inside a JScrollPane.
When i load a URL into it using setPage(URL url), the top of the page stays in view. this is how i want it.

However, I also call setText(String text) in a different function.
in this case, the pane scrolls to the bottom, instead of remaining at the top, as i would like.

I tried cheating and calling scrollRectToVisible(Rectangle contentRect) on the scrollpane viewport using a rectangle with coordinates at (0,0), but this did not make a difference.

Does anyone have any other ideas how I could keep the scrollbar at the top of the page?

Thanks

Philip
-------------------------
dhtml_phil@programmer.net

khfarooq May 16th, 2004 05:39 AM

i think me and u remain the same...as do read ma posts and try to answer it if possible..thanxxx



All times are GMT -4. The time now is 09:12 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.