diff --git a/out/production/Tetris/Tetris/Board.class b/out/production/Tetris/Tetris/Board.class index 9b2be0c..c34a9ba 100644 Binary files a/out/production/Tetris/Tetris/Board.class and b/out/production/Tetris/Tetris/Board.class differ diff --git a/src/Tetris/Board.java b/src/Tetris/Board.java index 5495507..c7362e2 100644 --- a/src/Tetris/Board.java +++ b/src/Tetris/Board.java @@ -61,5 +61,4 @@ public class Board extends JPanel } - } diff --git a/src/Tetris/GameGui.java b/src/Tetris/GameGui.java index ef98f26..eb51b4e 100644 --- a/src/Tetris/GameGui.java +++ b/src/Tetris/GameGui.java @@ -1,21 +1,43 @@ package Tetris; -import javax.swing.JFrame; -import javax.swing.JLabel; +import javax.swing.*; +import java.awt.*; + public class GameGui { public static final int width= 500, height =650; private Board board; - private JFrame window; + private JFrame frame; public GameGui(){ - window = new JFrame("Tetris"); + frame = new JFrame("Tetris"); + + JPanel panel = new JPanel(); + panel.setBorder(BorderFactory.createEmptyBorder(450, 30, 100, 30)); + JButton button1 = new JButton("Start"); + JButton button2 = new JButton("Pause"); + + panel.setLayout(new GridLayout(0,1)); + panel.add(button1); + panel.add(button2); + /* + window.add(panel, BorderLayout.EAST); + frame.add(window,BorderLayout.WEST); window.setSize(width,height); - window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + //window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + window.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); window.setResizable(false); window.setVisible(true); board = new Board(); window.add(board); +*/ + frame.add(panel,BorderLayout.EAST); + frame.setSize(width,height); + frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + frame.setResizable(false); + frame.setVisible(true); + board = new Board(); + frame.add(board,BorderLayout.CENTER); } public static void main(String [] args) {