Browse Source

refactoring: adjusted QuestionLabel size

master
Ozan-Can Ekinci 2 years ago
parent
commit
32dc8a0793
  1. 3
      src/main/java/Gui/GameGui.java

3
src/main/java/Gui/GameGui.java

@ -110,7 +110,7 @@ GridBagConstraints gbc;
public void createShowQuestion(int i) { public void createShowQuestion(int i) {
int numLines = runGame.CountFileLines("QandA/Money.txt"); int numLines = runGame.CountFileLines("QandA/Money.txt");
String[] arrMoney = runGame.readFile("QandA/Money.txt", numLines); String[] arrMoney = runGame.readFile("QandA/Money.txt", numLines);
String questionText = "Frage " + counter + ": " + arrMoney[i - 1] + "";
String questionText = "Frage " + counter + ": " + arrMoney[i - 1] + " Euro";
counter++; counter++;
ShowQuestionNr.setText(questionText); ShowQuestionNr.setText(questionText);
@ -133,6 +133,7 @@ GridBagConstraints gbc;
MainPanel.add(QuestionLabel); MainPanel.add(QuestionLabel);
QuestionLabel.setHorizontalAlignment(JLabel.CENTER); QuestionLabel.setHorizontalAlignment(JLabel.CENTER);
QuestionLabel.setVerticalAlignment(JLabel.NORTH); QuestionLabel.setVerticalAlignment(JLabel.NORTH);
QuestionLabel.setFont(new Font("Serif", Font.BOLD, 20));
headingPanel.add(QuestionLabel); headingPanel.add(QuestionLabel);
} }

Loading…
Cancel
Save