Skip to main content

How to get scrollbar value of my web browser?

1 reply [Last post]
weekian
Offline
Joined: 2008-12-15
Points: 0

I've embed a JDIC browser into a JScrollPane and I wish to retrieve the scrollbar values of the web page the user is currently visiting using AdjustmentListener.

Apparently, I'm able to see 2 scrollbars when i go to a website. the inner one is the IE's scrollbar which can be dragged. The outter one is the JScrollPane scrollbar which is not "draggable".

How am I able to work around with that?

Codes:

WebBrowser browser = new WebBrowser(new url...);
JScrollPane scrollPane = new JScrollPane(browser);
scrollPane.getVerticalScrollBar().addAdjustmentListener(this);
scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
weekian
Offline
Joined: 2008-12-15
Points: 0

Has anyone got any idea? -urgent-