root/Project Folder/bump_n_jump/GameFrame.java

User picture

Author: ahaurw01

Revision: 85 («Previous)


File Size: 811 Bytes

(April 07, 2009 16:46 UTC) About 3 years ago

added a new folder called Project Folder that contains the Eclipse project i've been using. Should be able to compile & run when put into eclipse.

 
Show/hide line numbers
package bump_n_jump;

import java.awt.*;
import javax.swing.*;

/*
 * GameFrame - the JFrame that contains the game panel.
 * Main method is here.
 */
public class GameFrame extends JFrame {

	private static final long serialVersionUID = 1L;
	private int frameWidth = 758, frameHeight = 759;
	
	/**
	 * Main method - create a new game frame.
	 */
	public static void main(String args[]) {
		GameFrame gf = new GameFrame();
		gf.setDefaultCloseOperation(EXIT_ON_CLOSE);
	}
	
	
	/**
	 * GameFrame constructor - create the frame and add the game object to it.
	 */
	public GameFrame() {
		setTitle("Bump 'n' Jump!");
		setSize(frameWidth, frameHeight);
		Game g = new Game();
		Container contentPane = getContentPane();
		contentPane.add(g);
		setVisible(true);
	}
	
	
	
	
}