29 lines
786 B
Java
29 lines
786 B
Java
import java.awt.*;
|
|
import javax.swing.*;
|
|
import java.util.*;
|
|
import java.io.*;
|
|
|
|
public class Changement{
|
|
|
|
ClassLoader loader = Thread.currentThread().getContextClassLoader();
|
|
InputStream file = loader.getResourceAsStream("Main.java");
|
|
InputStream file2 = loader.getResourceAsStream("Listeimage.java");
|
|
static public void fenetreCliquer(int LR){
|
|
Main.fenetre.remove(Main.pan);
|
|
Main.pan.remove(Listeimage.liste[Listeimage.index]);
|
|
if (LR==1){
|
|
Listeimage.index=Listeimage.index+1;
|
|
if(Listeimage.index>4){
|
|
Listeimage.index=0;
|
|
}
|
|
}else {
|
|
Listeimage.index=Listeimage.index-1;
|
|
if(Listeimage.index<0){
|
|
Listeimage.index=4;
|
|
}
|
|
}
|
|
Main.pan.add(Listeimage.liste[Listeimage.index]);
|
|
Main.fenetre.setContentPane(Main.pan);
|
|
Main.fenetre.repaint();
|
|
}
|
|
} |