Overview | Methods | Fields | This Package | All Packages
Specifies the new value of the scroll bar.
Syntax
public final int newValue;
Remarks
The value of the scroll bar represents the position of the scroll thumb. When a scroll event occurs, the newValue field is automatically set to the proposed change in the scroll thumb. However, you can override this change by explicitly setting the value of this field in your event handler. For example:
private void myScrollBar_scroll(Object source, ScrollEvent e)
{
/* If the user has dragged the scroll thumb, automatically
reset the scroll thumb to the minimum position. */
if (e.type == ScrollEventType.THUMB_POSITION)
e.newValue = myScrollBar.getMinimum();
}
See Also type