TP
This commit is contained in:
33
DEV2.1/TP09/02_Playlist/GestionSouris.java
Normal file
33
DEV2.1/TP09/02_Playlist/GestionSouris.java
Normal file
@@ -0,0 +1,33 @@
|
||||
import java.awt.event.*;
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
public class GestionSouris implements MouseListener {
|
||||
|
||||
private JLabel titre;
|
||||
|
||||
public GestionSouris(JLabel titre) {
|
||||
this.titre = titre;
|
||||
}
|
||||
|
||||
public void mouseClicked(MouseEvent evenement) {
|
||||
}
|
||||
|
||||
public void mouseEntered(MouseEvent evenement){
|
||||
this.titre.setOpaque(true);
|
||||
this.titre.setBackground(Color.CYAN);
|
||||
this.titre.repaint();
|
||||
}
|
||||
|
||||
public void mouseExited(MouseEvent evenement){
|
||||
this.titre.setOpaque(true);
|
||||
this.titre.setBackground(Color.WHITE);
|
||||
this.titre.repaint();
|
||||
}
|
||||
|
||||
public void mousePressed(MouseEvent evenement){
|
||||
}
|
||||
|
||||
public void mouseReleased(MouseEvent evenement){
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user