first commit

This commit is contained in:
2025-10-23 14:28:03 +02:00
commit fb76e22594
81 changed files with 3605 additions and 0 deletions

View File

@@ -0,0 +1,82 @@
package fr.iutflbeau.projet.view;
import fr.iutfbleau.projet.controller.ValidationChoix;
import fr.iutfbleau.projet.modele.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class FenetreQuizz extends JFrame implements ActionListener {
private Question[] questionsquiz;
private ChoixUitlisateur choix;
private int index = 0;
private boolean valide = false;
private JPanel zoneCentre new JPanel(new BorderLayout());
private JButton boutonPrecedent = new JButton("Précédent");
private JButton boutonSuivant = new JButton("Suivant");
private JButton boutonValider = new JButton("Valider");
private EcranQuestion EcranDeBase;
public FenetreQuizz(Question[] questionsquiz) {
super("QCM");
this.questionsquiz = questionsquiz;
this.choix = new ChoixUitlisateur(questionsquiz.length);
this.setLayout(new BorderLayout());
this.add(zoneCentre, BorderLayout.CENTER);
boutonSuivant.addActionListener(this);
boutonPrecedent.addActionListener(this);
boutonValider.addActionListener(this);
mettreAJourEcran();
this.setSize(520, 320);
this.setLocationRelativeTo(null);
this.setDefaultCloseOperation(EXIT_ON_CLOSE);
}
@Override
public void actionPerformed(ActionEvent e){
Object source = e.getSource();
if(source == boutonPrecedent){
AllerPrecedent();
}
if(source == boutonSuivant){
AllerSuivant();
}
if(source == boutonValider) {
Valider();
}
}
}