i need help drawing an image in an applet for some reason it doesn't show up but there are no errors
package Game;
import java.applet.*;
import java.awt.event.*;
import java.awt.*;
import javax.swing.ImageIcon;
public class AppletOne extends Applet implements Runnable, KeyListener{
int x_pos = 10;
int y_pos = 100;
int x_speed = 3;
int y_speed = 3;
int appletsize_x = 300;
int appletsize_y = 300;
Image pac = new ImageIcon("/Applet1/src/pacman.jpg").getImage();
private Image dbImage;
private Graphics dbg;
public void init(){
addKeyListener(this);
}
public void start(){
Thread th = new Thread(this);
th.start();
}
public void stop(){
}
public void destroy(){
}
public void run(){
Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
while(true){
repaint();
try{
Thread.sleep (20);
}catch(InterruptedException ex){}
Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
}
}
public void update(Graphics g){
if(dbImage == null){
dbImage = createImage(this.getSize().width,this.getSize().height);
dbg = dbImage.getGraphics();
}
dbg.setColor(getBackground());
dbg.fillRect(0, 0, this.getSize().width, this.getSize().height);
dbg.setColor(getForeground());
paint(dbg);
g.drawImage(dbImage, 0, 0, this);
g.drawImage(pac, x_pos, y_pos, null);
}
public void paint(Graphics g){
g.drawImage(pac, x_pos, y_pos, null);
}
public void keyPressed(KeyEvent e) {
if(e.getKeyChar() == KeyEvent.VK_W){
y_pos -= 3;
repaint();
e.consume();
}else if(e.getKeyChar() == KeyEvent.VK_S){
y_pos += 3;
repaint();
e.consume();
}else if(e.getKeyChar() == KeyEvent.VK_D){
x_pos += 3;
repaint();
e.consume();
}else if(e.getKeyChar() == KeyEvent.VK_A){
x_pos -= 3;
repaint();
e.consume();
}
}
public void keyReleased(KeyEvent e) {
}
public void keyTyped(KeyEvent e) {
}
}