Ą POLITECHNIK* RZESZOWSKA - WydłUI BtktrMdrśk) . IntarayW
I import java.awt.*; import javax.swing.*;
| import java.awt.event.*; .
public class MouseWheelTest extends JFrame lmplements
MousetiheelListener
private JSpinner spinner; r——
public MouseWheelTe3t () { I L.N.to.IT
super("MouseWheelTest"); ..........
setSize(220, 110);
spinner *» new JSpinner(); _______
spinner.addMouseWhaelListener(this);
getContentPaneO .add(spinner, BorderLayout.NORTH);
)
public void mouseWheelMoved(MouseWheelEvent e) (
int wheelRotation = e.getWheelRotation(); //
. Integor oldValue = <Integer)spinner.getValje int newValue = oldValue.inCValue() - wheelRo spinner. netValue (new Ińteger (r.ewValue));
public static void main(String(| args) ( new MouseWheelTest O . setvis ible (Cr);)
)