this is the source code http://www.bennychow.com/download/pacman_eclipse_project.zip
works as an applet
but I want to create tests (its due tomorrow :/) for this app and in order to do that I need to run it as an application
so I created a main method:
public static void main(String[] args) {
PacMan pacMan = new PacMan();
pacMan.init();
pacMan.start();
JFrame window = new JFrame("Sample Applet and Application");
window.setContentPane(pacMan);
window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
window.pack(); // Arrange the components.
//System.out.println(theApplet.getSize());
window.setVisible(true); // Make the window visible.
}
but with this main method i get exceptions that i didnt get when i was running it as an applet any ideas what I need to do in order to solve this?
thanks to all helpers.