Hi,
I wrote this bit of code for my game: (it is meant to be a copy of pong, so that is why the background is named that way)
import java.awt.geom.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.*; public class Game extends GameFramework { public static void main(String[] args) { Game game = new Game(); } public Game() { super(800,600); setBackground("pongintropage.png"); this.startGame(); } public void update(double elapsed) { } public void processKeys() { } @Override public void draw(Graphics2D g2) { } }
I expected the usual 800x600 pixel screen with the selected background, but instead I got that blank command prompt black screen. Is there something wrong with my code??
Thanks,
Yo Cas Cas