Skip to content
Permalink
c61885e41b
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
27 lines (24 sloc) 913 Bytes
import javax.swing.JFrame;
import javax.swing.JPanel;
/**
* Write a description of class TetrisApp here.
*
* @author Greg Johnson, University of Connecticut
* @version 0.3
*/
public class TetrisApp extends JFrame{
private GamePanel _gamePanel;
public TetrisApp(){
super("Tetris");
this.setResizable(false);
_gamePanel = new GamePanel();
_gamePanel.setPreferredSize(new java.awt.Dimension(TetrisConstants.BLOCK_SIZE*TetrisConstants.BOARD_WIDTH, TetrisConstants.BLOCK_SIZE*TetrisConstants.BOARD_HEIGHT + 22));
this.setSize(TetrisConstants.BLOCK_SIZE*TetrisConstants.BOARD_WIDTH, TetrisConstants.BLOCK_SIZE*TetrisConstants.BOARD_HEIGHT+22);
this.setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE);
this.add(_gamePanel);
this.setVisible(true);
}
public static void main(String[] args){
TetrisApp app = new TetrisApp();
}
}