Correction des bugs de verions entre Windows, Linux et macOS

This commit is contained in:
Moncef STITI 2024-04-29 14:34:45 +02:00
parent 62a90389ca
commit 0cc2067922
6 changed files with 29 additions and 7 deletions

View File

@ -13,7 +13,7 @@ JCFLAGS := -encoding UTF-8 -implicit:none
JVM := java
JVMFLAGS :=
SRCDIR := ./src/GridMaker
SRCDIR := ./src/GridSolver
OUTDIR := ./out
DOCDIR := ./doc
SRC := $(wildcard $(SRCDIR)/*.java)

View File

@ -19,6 +19,17 @@ public class Button extends JButton {
setBackground(new Color(96, 175, 255));
}
/**
* Constructor
* @param text The text of the button
* @param color The background color of the button
*/
public Button (String text,Color color) {
super(text);
setFont(new Font("Arial", Font.BOLD, 15));
setBackground(color);
}
/**
* Constructor
* @param text The text of the button

View File

@ -72,7 +72,7 @@ public class HomeView extends JPanel {
buttonPanel.setBackground(BACKGROUND_COLOR);
HomeButtonClickListener listenerButton = new HomeButtonClickListener(window);
for (String text : BUTTON_TEXTS) {
Button button = new Button(text, BUTTON_SIZE, BUTTON_FONT, BACKGROUND_COLOR);
Button button = new Button(text, BUTTON_SIZE, BUTTON_FONT, Color.white);
button.addActionListener(listenerButton);
buttonPanel.add(button);
}

View File

@ -19,6 +19,17 @@ public class Button extends JButton {
setBackground(new Color(96, 175, 255));
}
/**
* Constructor
* @param text The text of the button
* @param color The background color of the button
*/
public Button (String text,Color color) {
super(text);
setFont(new Font("Arial", Font.BOLD, 15));
setBackground(color);
}
/**
* Constructor
* @param text The text of the button

View File

@ -43,10 +43,10 @@ public class GSMenu {
this.buttonPanel.setBackground(new Color(54, 91, 109));
// Création des boutons
this.importerButton = new Button("Charger une grille");
this.jouerButton = new Button("Jouer");
this.importerButton = new Button("Charger une grille",Color.white);
this.jouerButton = new Button("Jouer",Color.white);
this.jouerButton.setEnabled(false); // Le bouton "Jouer" est désactivé par défaut
this.autoSolveButton = new Button("Résolution automatique");
this.autoSolveButton = new Button("Résolution automatique",Color.white);
this.autoSolveButton.setEnabled(false); // Le bouton "Résolution automatique" est désactivé par défaut
// Ajout des boutons au panneau de boutons

View File

@ -72,7 +72,7 @@ public class HomeView extends JPanel {
buttonPanel.setBackground(BACKGROUND_COLOR);
HomeButtonClickListener listenerButton = new HomeButtonClickListener(window);
for (String text : BUTTON_TEXTS) {
Button button = new Button(text, BUTTON_SIZE, BUTTON_FONT, BACKGROUND_COLOR);
Button button = new Button(text, BUTTON_SIZE, BUTTON_FONT, Color.white);
button.addActionListener(listenerButton);
buttonPanel.add(button);
}