Code example for Scrollbar

Methods: getValuesetValue

0
		slider.setValue((int) Math.round((value * 180 / Math.PI)));
		rotateTo(value);
	} 
 
	public void mouseWheelMoved(MouseWheelEvent e) {
		final int oldPos = slider.getValue();
		int newPos = oldPos + e.getWheelRotation();
		if (newPos < 0)
			newPos += 360;
		else if (newPos >= 360)
			newPos -= 360;
		rotateTo(newPos * Math.PI / 180);
		updateTextbox(); 
		slider.setValue(newPos);
	} 
} 
Contextual code suggestions in your IDE  Get Codota for Java