Can anyone show their working code?

I have been trying to make a game with AWT and diffent classes..

And every time i get a NullPointerExaption i have now posted 2 topics in diffrent forums and nothing seams to make it work...

So now i ask.. if someone got a source code file off a game:

# Using AWT

# Having diffrent classes

Please let me see its code so that i can learn..

This problem of mine has stoped my project for a very long time now.

[450 byte] By [mihalyB] at [2007-9-27 16:37:49]
# 1
sigh
Abuse at 2007-7-6 0:55:44 > top of Java-index,Other Topics,Java Game Development...
# 2

There's some source code for games in this thread:

http://forums.java.sun.com/thread.jsp?forum=406&thread=282080

If not, just search these forums or google for java games, not too difficult.

A NullPointerException is caused your object isn't pointing to anything (null) and you call a method on it, for example. You just have to make sure your object has been created before using it.

Ceranith at 2007-7-6 0:55:44 > top of Java-index,Other Topics,Java Game Development...
# 3
It would be much easier to look at the line in your code that produces the nullPointerException and show us that part of your non-working code.
Breakfast at 2007-7-6 0:55:44 > top of Java-index,Other Topics,Java Game Development...
# 4
Hi mihalyB, you were asking about the code for The Chloe Game on a different thread, if you want a copy just email me (my address is on the title screen) and I'll send it to you.
Olly_W at 2007-7-6 0:55:44 > top of Java-index,Other Topics,Java Game Development...
# 5

> It would be much easier to look at the line in your

> code that produces the nullPointerException and show

> us that part of your non-working code.

yea I have done that..i posted 2.

http://forum.java.sun.com/thread.jsp?forum=406&thread=291010

http://forum.java.sun.com/thread.jsp?forum=54&thread=290558

Tanks for trying to help me

mihalyB at 2007-7-6 0:55:44 > top of Java-index,Other Topics,Java Game Development...
# 6

> It would be much easier to look at the line in your

> code that produces the nullPointerException and show

> us that part of your non-working code.

yea I have done that..i posted 2.

http://forum.java.sun.com/thread.jsp?forum=406&thread=291010

http://forum.java.sun.com/thread.jsp?forum=54&thread=290558

Tanks for trying to help me

mihalyB at 2007-7-6 0:55:44 > top of Java-index,Other Topics,Java Game Development...