// Tyler Rigsby, CSE 142 // Draws several examples of a stair-like pattern import java.awt.*; public class Stairs { public static void main(String[] args) { DrawingPanel panel = new DrawingPanel(300, 300); Graphics g = panel.getGraphics(); for (int i = 1; i <= 10; i++) { // red, green, blue g.setColor(new Color(i * 40, 255 - i * 30, 62 + i * 10)); g.fillRect(50, 40 + 10 * i, 10 * i, 10); } } }