Correction des bugs de verions entre Windows, Linux et macOS
This commit is contained in:
@@ -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
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -18,6 +18,17 @@ public class Button extends JButton {
|
||||
setFont(new Font("Arial", Font.BOLD, 15));
|
||||
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
|
||||
|
@@ -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
|
||||
|
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user