Re: JScrollPane & the scroll speed ?
- From: "Bart Cremers" <bcremers@xxxxxxxxx>
- Date: 30 Aug 2006 03:14:34 -0700
Dado wrote:
Is it difficult to speed up the scroll of JScrollPane content ? It is too
slow for me, if I use the mouse wheel or arrows of a slider.
You'll have to override the scrollable increment methods in your
scrollable component (the thing you add to the scrollpane). Following
code makes scrolling in a JEditorPane really slow. The numeric values
are the number of pixels the view should be moved for a click on the
arrow or in the gray area of the scrollbar.
JEditorPane ePane = new JEditorPane(url) {
public int getScrollableUnitIncrement(Rectangle visibleRect, int
orientation, int direction) {
return 1;
}
public int getScrollableBlockIncrement(Rectangle visibleRect, int
orientation, int direction) {
return 2;
}
};
Regards,
Bart
.
- Follow-Ups:
- Re: JScrollPane & the scroll speed ?
- From: Brandon McCombs
- Re: JScrollPane & the scroll speed ?
- References:
- JScrollPane & the scroll speed ?
- From: Dado
- JScrollPane & the scroll speed ?
- Prev by Date: Re: how to refresh jComboBox in popupMenuWillBecomeVisible
- Next by Date: Re: Docs In Jcreator
- Previous by thread: JScrollPane & the scroll speed ?
- Next by thread: Re: JScrollPane & the scroll speed ?
- Index(es):
Relevant Pages
|