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();
	} 
}