wow le tp là
This commit is contained in:
25
DEV3.1/TP01/02_Victoire/Rafraichir.java
Normal file
25
DEV3.1/TP01/02_Victoire/Rafraichir.java
Normal file
@@ -0,0 +1,25 @@
|
||||
import java.awt.*;
|
||||
import javax.swing.*;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.awt.event.ActionEvent;
|
||||
|
||||
public class Rafraichir implements ActionListener {
|
||||
|
||||
private JLabel texteScore;
|
||||
private JLabel textePays;
|
||||
private Fenetre fenetre;
|
||||
|
||||
public Rafraichir(JLabel texteScore, JLabel textePays, Fenetre fenetre) {
|
||||
this.texteScore = texteScore;
|
||||
this.textePays = textePays;
|
||||
this.fenetre = fenetre;
|
||||
}
|
||||
|
||||
public void actionPerformed(ActionEvent evenement) {
|
||||
Connexion cnx2 = new Connexion();
|
||||
|
||||
this.texteScore.setText(cnx2.getScorePays() + "");
|
||||
this.textePays.setText(cnx2.getNomPays());
|
||||
this.fenetre.repaint();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user