Please do not bump your own threads.
Can you show us how you initialize Frame? Nothing in this code looks wrong.
Also, it is best to call exc.printStackTrace() instead of those two printlns in your code.
Sorry for the bump. I will post the code soon. I did the Println just for testing purposes. The exception is never handled either way.
If you knew what a nullpointerexception was, I think you would have more code included, so - a nullpointerexception is thrown when you try to utilize an object that has a value of 'null', or nothing. Usually when you forget to initialize an object. And, yes, please don't bump your threads, especially after only 2 hours. If you really need to, discreetly post an 'update' post.
I know what a null value and what the exception means. The reason for the null pointer is due to the graphics object never being initialized because the buffer strategy was never created.
And thanks for the bumping tip.
Why are you using AWT Window?
Why are you using Java2D at all? Why not a more modernized framework like JavaFX, or better yet, something based on OpenGL (hint: LibGDX).
Well for starters, I need to get used to Java's API before I get into anything deeper. And also this is a very small project. I just want to get used to Java. Maybe later on I'll use JavaFX or LibGDX. But still thanks for the framework examples. I haven't heard of either of them.