public void paintComponent(Graphics g) { // The method that draws everything
		Random rand = new Random(); // Create a new Random object
		
		for (int i = 0; i < numRects; i ++) { // Loop numRects times
			switch (rand.nextInt(3)) { // Switch on a random number from 0 to 2, inclusive
			case 0: // If 0:
				g.setColor(Color.RED); // Set the colour to red
				break; // Leave the switch
			
			case 1: // If 1:
				g.setColor(Color.GREEN); // Set the colour to green
				break; // Leave the switch
				
			default: // Otherwise:
				g.setColor(Color.BLUE); // Set the colour to blue
			}
			
			int x = rand.nextInt(getWidth()); // The x coordinate of the top left corner of the rectangle is a random number from the range (0, width of the screen - 1), inclusive
			int y = rand.nextInt(getHeight()); // The y coordinate of the top left corner of the rectangle is a random number from the range (0, height of the screen - 1), inclusive
			
			int width = rand.nextInt(getWidth()); // The width of the rectangle is a random number from the range (0, width of the screen - 1), inclusive
			int height = rand.nextInt(getHeight()); // The height of the rectangle is a random number from the range (0, height of the screen - 1), inclusive
			
			g.fillRect(x, y, width, height); // Draw a width x height filled rectangle with the top left corner at (x, y)
		}
	}