Hi there!

I have encountered a problem with BufferStrategys and Graphics in Java:

I am running an infinite while loop:

Java Code:
while(running){
			BufferStrategy bs = getBufferStrategy();
			
			if(bs == null){
				createBufferStrategy(2);
				continue;
			}
			
			Graphics g = bs.getDrawGraphics();
			g.setColor(Color.GREEN);
			g.fillRect(10, 10, 100, 100);
			g.dispose();
			bs.show();
		}
On windows (xp) it draws a green rectangle of dimensions 100x100 at the position (10|10) like it should do. But when i run the same code on my Mac it just shows a gray background, nothing else.

What could be the Problem here?

Here is also the entire class code
Java Code:
import java.awt.*;
import java.awt.image.*;

import javax.swing.JFrame;

public class Main extends Canvas implements Runnable{
	private static final long serialVersionUID = 1L;
	
	public static final int WIDTH = 720;
	public static final int HEIGHT = 720;
	
	private JFrame frame;
	
	private Thread thread;
	
	private boolean running;
	
	//private BufferedImage image = new BufferedImage(WIDTH, HEIGHT, BufferedImage.TYPE_INT_RGB);
	//private int[] pixels = ((DataBufferInt) image.getRaster().getDataBuffer()).getData();
	
	public void render(){
		
	}
	
	public void run() {
		while(running){
			BufferStrategy bs = getBufferStrategy();
			
			if(bs == null){
				createBufferStrategy(2);
				continue;
			}
			
			Graphics g = bs.getDrawGraphics();
			g.setColor(Color.GREEN);
			g.fillRect(10, 10, 100, 100);
			g.dispose();
			bs.show();
		}
	}
	
	public void start(){
		if(!running){
			running = true;
			thread = new Thread(this);
			thread.start();
		}
	}
	
	public static void main(String[] args) {
		new Main().start();
	}
	
	public Main(){
		frame = new JFrame("Mandelbrot");
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.setSize(WIDTH, HEIGHT);
		frame.setLocationRelativeTo(null);
		frame.setResizable(false);
		frame.setVisible(true);
		frame.add(this);
	}
}
My goal in the end is programming the Mandelbrot set, if any of you has a better way to do this using only the JRE System Library, I would appreciate your recommendations :)

Thank you for your answers