• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Problem with scrollbar in the scrollpane

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using a scrollpane into which i am setting a textpane which has HTML content displayed inside it.This is done by setting a "HTMLDocument" in the TestPane
This scrollpane is a part of a splitpane.The scrollpane is on the right half of thesplit pane.The left pane of the split pane contains a panel with labels set inside it.The functionality is such that when i click on the label on the left pane the corresponding HTML loads in the right pane.
The problem is that if in the scrollpane i scroll over to the middle and then i click on a new link in the left pane , e new HTML loads but its scrollbar scrolls automatically towards the position as was with the previous screen.
Any ideas as to why this is happening

Thanks in advance
Pankaj
 
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Call setScrollPosition() method to re initialize the scroll position just after you load new HTML.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic