reparation des probleme avec la base de donne

This commit is contained in:
llample3
2026-03-28 11:21:36 +01:00
parent c8c827fb7f
commit 1e0b7d86d5
23 changed files with 9 additions and 0 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 815 KiB

View File

@@ -24,6 +24,9 @@ public class CadreDeConnexion extends JFrame {
}
public CadreDeConnexion() {
// S'assure que la structure de la base existe même avant la connexion/création de compte
GestionBDD.creerTableUtilisateurSiAbsente();
GestionBDD.creerTableScoreSiAbsente();
// Image de fond de la page de connexion
Background panelBackground = null;

View File

@@ -6,6 +6,12 @@ public class GestionBDD {
private static final String URL = "jdbc:sqlite:UserScoreBDD.db";
// Initialisation automatique de la base de données au chargement de la classe
static {
creerTableUtilisateurSiAbsente();
creerTableScoreSiAbsente();
}
// connexion BDD
private static Connection connecter() throws SQLException {
return DriverManager.getConnection(URL);