Fixed letter alignment below the board

This commit is contained in:
Kai S. K. Engelbart 2019-07-28 09:43:53 +02:00
parent a101632c7b
commit ffcb1efc11
Signed by: kske
GPG Key ID: 8BEB13EC5DF7EF13

View File

@ -82,8 +82,11 @@ public class MainWindow {
mframe.getContentPane().add(toolPanel, BorderLayout.NORTH);
JPanel letterPanel = new JPanel(new GridLayout(1, 8));
for (int i = 0; i < 8; i++)
letterPanel.add(new JLabel(String.valueOf((char) (65 + i))));
for (int i = 0; i < 8; i++) {
JLabel letterLabel = new JLabel(String.valueOf((char) (65 + i)));
letterLabel.setHorizontalAlignment(JLabel.CENTER);
letterPanel.add(letterLabel);
}
mframe.add(letterPanel, BorderLayout.SOUTH);
JPanel numberPanel = new JPanel(new GridLayout(8, 1));