Browse Source

Added GridBagConstraints and GridBagLayout

master
Leon Montag 2 years ago
parent
commit
ba50d3fea4
  1. 6
      src/main/java/Gui/GameGui.java

6
src/main/java/Gui/GameGui.java

@ -1,6 +1,8 @@
package Gui;
import java.awt.Font;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import javax.swing.JLabel;
@ -11,6 +13,7 @@ public class GameGui {
public static JPanel MainPanel, ButtonPanel, headingPanel;
public static JLabel Headline,QuestionLabel;
GridLayout grid;
GridBagConstraints gbc;
public void createGui() {
@ -31,5 +34,8 @@ GridLayout grid;
QuestionLabel.setHorizontalAlignment(JLabel.CENTER);
QuestionLabel.setVerticalAlignment(JLabel.NORTH);
headingPanel.add(QuestionLabel);
ButtonPanel.setLayout(new GridBagLayout());
gbc = new GridBagConstraints();
}
}
Loading…
Cancel
Save