When i test run my game i get a applet noninit error. I opened my java console and found the following error:
If i have to make an intelligent guess it would have to do with my LoadImage being called by the Ball class at the applets Init method, but what is a NullPointer? Any ideas?
Here is the code:
GameObject.java
import java.applet.*;
import java.awt.*;
import java.net.*;
public abstract class GameObject extends Applet {
private int x;
private int y;
private int vx;
private int vy;
private Image image;
//member methods
public void setX(int new_x) {x = new_x;}
public void setY(int new_y) {y = new_y;}
public void setVX(int new_vx) {vx = new_vx;}
public void setVY(int new_vy) {vy = new_vy;}
//ancestor methods
public int getX() {return x;}
public int getY() {return y;}
public int getVX() {return vx;}
public int getVY() {return vy;}
public Image getImage() {return image;}
public int getImageWidth(){return image.getWidth(this);}
public int getImageHeight(){return image.getHeight(this);}
//boundry checking code
public boolean hitTopBountry(){if(getY() < 0) {return true;}else{return false;}}
public boolean hitLeftBountry(){if(getX() < 0){return true;}else{return false;}}
public boolean hitBottomBountry(){if(getY() > this.getHeight()){return true;}else{return false;}}
public boolean hitRightBountry(){if(getX() > this.getWidth()){return true;}else{return false;}}
public void loadImage(String filename) {
// load image file
image = getImage (getCodeBase(), filename);
}
public abstract void Draw(Graphics g);
public abstract void Update();
}
Ball.java
import java.awt.*;
class Ball extends GameObject{
public Ball(int initial_x, int initial_y, int initial_vx, int initial_vy, String filename) {
setX(initial_x);
setY(initial_y);
setVX(initial_vx);
setVY(initial_vy);
loadImage(filename);
}
public void Update() {
Move();
Check_Bounds();
}
public void Check_Bounds() {
//ball has collided with the left boundry
if(getX() <= 0) {
setVX(-getVX());
}
//ball has collided with the right boundry
if(getX() >= this.getWidth()) {
setVX(-getVX());
}
//ball has collided with the top boundry
if(getY() <= 0) {
setVY(-getVY());
}
//ball has collided with the bottom boundry
if(getY() >= this.getHeight()) {
setVY(-getVY());
}
}
public void Move() {
setX(getX() + getVX());
setY(getY() + getVY());
}
public void Draw(Graphics g) {
g.drawImage(getImage(), getX(), getY(), this);
}
}
Hyper_Rush_Pong.java
// import necessary packages
import java.applet.*;
import java.awt.*;
// Inherit the applet class from the class Applet
public class Hyper_Rush_Pong extends Applet implements Runnable
{
// declare two instance variables for double buffering at the head of the program
private Image dbImage;
private Graphics dbg;
//declare our game objects
Ball ball;
// Now you should implement the following methods
// init - method is called the first time you enter the HTML site with the applet
public void init() {
Ball ball = new Ball(250, 200, 1, 1, "Data/Gfx/Ball.png");
}
// start - method is called every time you enter the HTML - site with the applet
public void start() {
// define a new thread
Thread th = new Thread (this);
// start this thread
th.start ();
}
// stop - method is called if you leave the site with the applet
public void stop() {
}
// destroy method is called if you leave the page finally (e. g. closing browser)
public void destroy() {
}
// run method is called everytime to move the objects onscreen
// define a new thread
public void run() {
// lower ThreadPriority
Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
// run a long while (true) this means in our case "always"
while (true)
{
// repaint the applet
repaint();
try
{
// Stop thread for 20 milliseconds
Thread.sleep (20);
}
catch (InterruptedException ex)
{
// do nothing
}
// set ThreadPriority to maximum value
Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
}
}
/** Update - Method, implements double buffering */
public void update (Graphics g) {
// initialize buffer
if (dbImage == null)
{
dbImage = createImage (this.getSize().width, this.getSize().height);
dbg = dbImage.getGraphics ();
}
// clear screen in background
dbg.setColor (getBackground ());
dbg.fillRect (0, 0, this.getSize().width, this.getSize().height);
// draw elements in background
dbg.setColor (getForeground());
paint (dbg);
// draw image on the screen
g.drawImage (dbImage, 0, 0, this);
}
/** paint - method allows you to paint into your applet. This method is called e.g. if you move your browser window or if you call repaint() */
public void paint (Graphics g) {
ball.Draw(g);
}
}
BTW the nio package impl. a RandomAccesFile with channel that can be FileLock’ed to replace the usual File-FileInputStream. That can also avoid wrong file data. 
I don’t wanna be disturbing you with that, but it can be the IDE to reconfigure…