public FramerateDemo() {
		 		
		MinuetoFont fontArial16;				// Font used to write framerate.
		MinuetoImage imageFramerate;			// Text use to display framerate.
		
		MinuetoColor color[] = new MinuetoColor[5];	// Array of color
		MinuetoImage imageSquare[] = new MinuetoImage[20];
		
		int aCoordX[] = new int[20];
		int aCoordY[] = new int[20];
		
		Random ranNumGenerator;				// Our random number generator.		
				
		int randomNumber;
		
		// Create a 640 by 480 window.
		window = new MinuetoFrame(640, 480, true);
		
		eventQueue = new MinuetoEventQueue(); 
		
		// Init random number generator.
		ranNumGenerator = new Random();		
				
		// Init the font.
		fontArial16 = new MinuetoFont("Arial",16,false, false);
		
		// Prepare the color array.
		color[0] = MinuetoColor.BLACK;
		color[1] = MinuetoColor.RED;
		color[2] = MinuetoColor.GREEN;
		color[3] = MinuetoColor.BLUE;
		color[4] = MinuetoColor.WHITE;
									
		for (int i = 0; i < 20; i++) {
			imageSquare[i] = new MinuetoRectangle( 
				ranNumGenerator.nextInt(99)+1 , 
				ranNumGenerator.nextInt(99)+1 , 
				color[ranNumGenerator.nextInt(5)],
				true );
				
			aCoordX[i] = ranNumGenerator.nextInt(560);
			aCoordY[i] = ranNumGenerator.nextInt(400);
			
		}
		
		this.window.setMaxFrameRate(frameRate);

		this.window.registerKeyboardHandler(this, this.eventQueue);
		
		// Show the game window.
		window.setVisible(true);
					
		// Game/Rendering loop	
		while(true) {
		
			this.window.clear();
			
			while (eventQueue.hasNext()) {
				eventQueue.handle();
			}
			
			randomNumber = ranNumGenerator.nextInt(20);
			
			// For every lines we are supposed to draw:
			for(int i = 0; i < 20; i++) {
				this.window.draw(imageSquare[i], aCoordX[(i+randomNumber)%20], aCoordY[(i+randomNumber*2+1)%20]);
			}
			
			imageFramerate = new MinuetoText("Max FPS: " + frameRate + " Current FPS: " + window.getFrameRate(), fontArial16, MinuetoColor.BLUE);
			
			// We display the framerate and the line count
			this.window.draw(imageFramerate, 0, 0);
			
			// Render all graphics in the back buffer.			
			this.window.render();
			
			Thread.yield();
		}
		
		
	}