DEV_BUT1/DEV2.1/TP09/Exo1/VolumeAct.java
2023-04-04 14:03:16 +02:00

25 lines
530 B
Java

import java.awt.event.*;
public class VolumeAct implements MouseWheelListener {
private int a;
private Cercles ce;
public VolumeAct(Cercles chat){
super();
this.a=0;
this.ce=chat;
}
public void mouseWheelMoved(MouseWheelEvent e){
int i;
i=e.getWheelRotation();
if(i<0 && this.a<10){
this.a++;
ce.getNombre(this.a);
}
if(i>0 && this.a>0){
this.a--;
ce.getNombre(this.a);
}
}
}