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

public class ActionIndividus implements MouseListener{
    public JLabel musique;
    public boolean isActived;

    public ActionIndividus(JLabel musique){
	this.musique = musique;
	this.musique.setOpaque(true);
	this.musique.setBackground(new Color(255,255,255));
    }
    @Override
    public void mouseClicked(MouseEvent evenement){
	this.musique.setBackground(new Color(100,255,0));
	this.isActived = true;
    }
    @Override
    public void mouseEntered(MouseEvent evenement){
	if (this.isActived == false){
	    this.musique.setBackground(new Color(100,100,100));
	}
    }
    @Override
    public void mouseExited(MouseEvent evenement){
	if (this.isActived == false){
	    this.musique.setBackground(new Color(255,255,255));
	}
    }
    @Override
    public void mousePressed(MouseEvent evenement){
    }
    @Override
    public void mouseReleased(MouseEvent evenement){
    }
}


