DEV/DEV3.1/TP2:Transitions/GalerieVersionTransition/Galerie.java

37 lines
763 B
Java
Raw Normal View History

2023-09-20 11:29:37 +02:00
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.util.*;
2023-10-05 10:27:11 +02:00
import java.io.*;
2023-09-20 11:29:37 +02:00
public class Galerie extends JPanel implements MouseListener{
2023-10-05 10:27:11 +02:00
ClassLoader loader = Thread.currentThread().getContextClassLoader();
InputStream file = loader.getResourceAsStream("Changement.java");
2023-09-20 11:29:37 +02:00
public Galerie(){
super();
}
public void mouseClicked(MouseEvent e){
int x = e.getX();
if (x <= this.getWidth()/5){
Changement.fenetreCliquer(0);
}else if(x >= (this.getWidth()/5)*4){
Changement.fenetreCliquer(1);
}
}
public void mouseEntered(MouseEvent evenement){
}
public void mouseExited(MouseEvent evenement){
}
public void mousePressed(MouseEvent evenement){
}
public void mouseReleased(MouseEvent evenement){
}
}