import java.awt.event.*;
import java.awt.*;
import javax.swing.*;

public class GestionMolette implements MouseWheelListener {

	private JPanel fond;

	public GestionMolette(JPanel fond) {
		this.fond = fond;
	}

	public void mouseWheelMoved(MouseWheelEvent evenement) {
		if (evenement.getWheelRotation() < 0) {
			this.fond.setBackground(Color.WHITE);
		}
		else {
			this.fond.setBackground(Color.BLACK);
		}
	}
}