I made the mainBall object based on my MainBall class and put mainBall.paintMainBall(g) in my paint method and now it gives me another error:
Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException
at game.paint(game.java:251)
at game.update(game.java:227)
so its where i put the mainBall.paintMainBall(g) but the compiler doesnt see anything wrong with it
herpderp i forgot to create the object
MainBall mainBall = new MainBall(x, y, width, height);
that worked fine, but now it wont move. good lord this is frusterating
fixed it so that the coordinates of the mainBall change when i press the keys but it isnt being redrawn so the ball stays in one spot. almost!!!!
Show differencesHistory of post edits
#3burnt_casadilla
Posted 12 August 2012 - 04:56 PM
I made the mainBall object based on my MainBall class and put mainBall.paintMainBall(g) in my paint method and now it gives me another error:
Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException
at game.paint(game.java:251)
at game.update(game.java:227)
so its where i put the mainBall.paintMainBall(g) but the compiler doesnt see anything wrong with it
herpderp i forgot to create the object
MainBall mainBall = new MainBall(x, y, width, height);
that worked fine, but now it wont move. good lord this is frusterating
Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException
at game.paint(game.java:251)
at game.update(game.java:227)
so its where i put the mainBall.paintMainBall(g) but the compiler doesnt see anything wrong with it
herpderp i forgot to create the object
MainBall mainBall = new MainBall(x, y, width, height);
that worked fine, but now it wont move. good lord this is frusterating
#2burnt_casadilla
Posted 12 August 2012 - 04:55 PM
I made the mainBall object based on my MainBall class and put mainBall.paintMainBall(g) in my paint method and now it gives me another error:
Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException
at game.paint(game.java:251)
at game.update(game.java:227)
so its where i put the mainBall.paintMainBall(g) but the compiler doesnt see anything wrong with it
herpderp i forgot to create the object
MainBall mainBall = new MainBall(x, y, width, height);
that worked fine
Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException
at game.paint(game.java:251)
at game.update(game.java:227)
so its where i put the mainBall.paintMainBall(g) but the compiler doesnt see anything wrong with it
herpderp i forgot to create the object
MainBall mainBall = new MainBall(x, y, width, height);
that worked fine
#1burnt_casadilla
Posted 12 August 2012 - 04:44 PM
I made the mainBall object based on my MainBall class and put mainBall.paintMainBall(g) in my paint method and now it gives me another error:
Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException
at game.paint(game.java:251)
at game.update(game.java:227)
so its where i put the mainBall.paintMainBall(g) but the compiler doesnt see anything wrong with it
Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException
at game.paint(game.java:251)
at game.update(game.java:227)
so its where i put the mainBall.paintMainBall(g) but the compiler doesnt see anything wrong with it