From 32dc8a0793c0c3716c089c19201fc874df4fe2fa Mon Sep 17 00:00:00 2001 From: Ozan-Can Ekinci Date: Sun, 15 Jan 2023 20:39:23 +0100 Subject: [PATCH] refactoring: adjusted QuestionLabel size --- src/main/java/Gui/GameGui.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/Gui/GameGui.java b/src/main/java/Gui/GameGui.java index 997a964..5d27dc3 100644 --- a/src/main/java/Gui/GameGui.java +++ b/src/main/java/Gui/GameGui.java @@ -17,8 +17,8 @@ import game.runGame; public class GameGui implements GameGuiInterface { public static JPanel MainPanel, ButtonPanel, headingPanel, WinningPanel, LosingPanel; -public static JLabel Headline,QuestionLabel,WinningLabel, LosingLabel, ShowQuestionNr, HighScoreLabel; -public static JButton AnswersBtn1,AnswersBtn2,AnswersBtn3,AnswersBtn4,RestartBtn,RestartBtn1,ClosingBtn; +public static JLabel Headline, QuestionLabel, WinningLabel, LosingLabel, ShowQuestionNr, HighScoreLabel; +public static JButton AnswersBtn1, AnswersBtn2, AnswersBtn3, AnswersBtn4, RestartBtn, RestartBtn1, ClosingBtn; public static int questionNr = 0; public static int counter = 1; public static int highScore = 0; @@ -110,7 +110,7 @@ GridBagConstraints gbc; public void createShowQuestion(int i) { int numLines = runGame.CountFileLines("QandA/Money.txt"); String[] arrMoney = runGame.readFile("QandA/Money.txt", numLines); - String questionText = "Frage " + counter + ": " + arrMoney[i - 1] + "€"; + String questionText = "Frage " + counter + ": " + arrMoney[i - 1] + " Euro"; counter++; ShowQuestionNr.setText(questionText); @@ -133,6 +133,7 @@ GridBagConstraints gbc; MainPanel.add(QuestionLabel); QuestionLabel.setHorizontalAlignment(JLabel.CENTER); QuestionLabel.setVerticalAlignment(JLabel.NORTH); + QuestionLabel.setFont(new Font("Serif", Font.BOLD, 20)); headingPanel.add(QuestionLabel); }