Added JScrollPane to statsPanel for statistics
parent
28496459cf
commit
d1d85ed428
|
|
@ -1,5 +1,6 @@
|
|||
package de.hs_mannheim.informatik.chess.view;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.Color;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Font;
|
||||
|
|
@ -7,12 +8,15 @@ import java.awt.GridBagConstraints;
|
|||
import java.awt.GridBagLayout;
|
||||
import java.awt.GridLayout;
|
||||
import java.awt.Insets;
|
||||
import java.util.List;
|
||||
|
||||
import javax.swing.BoxLayout;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JFrame;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.JPanel;
|
||||
import javax.swing.JScrollPane;
|
||||
import javax.swing.SwingConstants;
|
||||
|
||||
import de.hs_mannheim.informatik.chess.model.BoardDTO;
|
||||
|
|
@ -23,6 +27,9 @@ public class GameGui {
|
|||
private JLabel[][] fields = new JLabel[8][8];
|
||||
private JButton flipBoardButton;
|
||||
private boolean isFlipped = false;
|
||||
|
||||
private JPanel moveListPanel;
|
||||
private JScrollPane moveListScroll;
|
||||
|
||||
public GameGui(){
|
||||
mainFrame();
|
||||
|
|
@ -126,9 +133,16 @@ public class GameGui {
|
|||
}
|
||||
|
||||
public JPanel statsPanel() {
|
||||
JPanel statsPanel = new JPanel();
|
||||
statsPanel.setBackground(new Color(0x0d1b2a));
|
||||
return statsPanel;
|
||||
JPanel statsPanel = new JPanel(new BorderLayout());
|
||||
statsPanel.setBackground(new Color(0x0d1b2a));
|
||||
moveListPanel = new JPanel();
|
||||
moveListPanel.setLayout(new BoxLayout(moveListPanel, BoxLayout.Y_AXIS));
|
||||
moveListPanel.setBackground(new Color(0x0d1b2a));
|
||||
|
||||
moveListScroll = new JScrollPane(moveListPanel);
|
||||
moveListScroll.setPreferredSize(new Dimension(250, 800));
|
||||
statsPanel.add(moveListScroll, BorderLayout.CENTER);
|
||||
return statsPanel;
|
||||
}
|
||||
|
||||
public JLabel getField(int row, int col) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue