painting and animating in Jpanel

I drew an Oval and that is supposed to move right, when infact it doesn’t. I’m also a little confused about when invoking a BufferedImage.

public class GamePanel extends JPanel implements Runnable {
	
	public static int WIDTH = 1024;
	public static int HEIGHT = WIDTH / 16 * 9;
	private Thread t1;
	boolean running;
	private int FPS = 60;
	private long optimalTime = 1000 / FPS;
	private int heroX = 200;
	private int heroY = 200;
	
	
	public void addNotify(){
		Dimension size = new Dimension(WIDTH,HEIGHT);
		setPreferredSize(size);
		setFocusable(true);
		requestFocus();
		running = true;
		t1 = new Thread(this);
		t1.start();
	}
	

	
	public void paintComponent (Graphics g){
		super.paintComponent(g);
		Graphics2D g2 = (Graphics2D) g;
		g2.setColor(Color.WHITE);
		g2.fillRect(0, 0, WIDTH, HEIGHT);
		g2.setColor(Color.BLACK);
	    g2.fillOval(heroX, heroY, 50, 50);
	    g2.dispose();
	}

	
	public void run() {
		long startTime;
		long passedTime;
		long waitTime;
		while (running){
			startTime = System.nanoTime();
			System.out.println("Runs");
			update();
			repaint();
			passedTime = System.nanoTime() - startTime;
			waitTime = optimalTime - passedTime / 1000000;
			try {
				if (waitTime <= 0){
					waitTime = 2;
				}
				Thread.sleep(waitTime);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
		
	}


	private void update() {
		
		heroX += 2;
		
	}

}