aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes About Knob of JScrollPane.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "About Knob of JScrollPane.." Watch "About Knob of JScrollPane.." New topic
Author

About Knob of JScrollPane..

tonia wang
Greenhorn

Joined: Jun 10, 2003
Posts: 2
Hi All,
I have a problem about JScrollPane: how to do something when the scroll bar of JScrollPane is moved? For example,
public void mousePressed(MouseEvent e){
if(e.getSource()==jScrollPane)
txt.setText("scroll!");
}
I've read the doc: http://java.sun.com/docs/books/tutorial/uiswing/components/scrollpane.html
It says the scroll bar is called Knob. However, it does not says how to trigger the Knob when users move the Knob...
Appreciate for any help. Thanks a lot!
Best Regards,
Tonia.
[ June 11, 2003: Message edited by: tonia wang ]
Abhik Sarkar
Ranch Hand

Joined: Jun 14, 2003
Posts: 61
Hi Tonia,
How about...

Hope this helps!
Abhik.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: About Knob of JScrollPane..