Permalink
Cannot retrieve contributors at this time
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?
Team3FinalProject/CentipedeApp.java
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
24 lines (20 sloc)
885 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.swing.JFrame; | |
import javax.swing.JPanel; | |
public class CentipedeApp extends JFrame | |
{ | |
// instance variables - replace the example below with your own | |
private GamePanel _gamePanel; | |
public CentipedeApp(){ | |
super("Centipede"); | |
this.setResizable(false); | |
_gamePanel = new GamePanel(); | |
_gamePanel.setPreferredSize(new java.awt.Dimension(CentipedeConstants.BLOCK_SIZE*CentipedeConstants.BOARD_WIDTH, CentipedeConstants.BLOCK_SIZE*CentipedeConstants.BOARD_HEIGHT)); | |
this.setSize(CentipedeConstants.BLOCK_SIZE*CentipedeConstants.BOARD_WIDTH, CentipedeConstants.BLOCK_SIZE*CentipedeConstants.BOARD_HEIGHT); | |
this.setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE); | |
this.add(_gamePanel); | |
this.setVisible(true); | |
} | |
public static void main(String[] args){ | |
CentipedeApp app = new CentipedeApp(); | |
} | |
} |