package eecs1022; import java.awt.Color; import javax.swing.JOptionPane; import franck.Grid; public class Triangle { public static void main(String[] args) { String input = JOptionPane.showInputDialog("Size"); final int SIZE = Integer.parseInt(input); Grid grid = new Grid(SIZE, SIZE); for (int r = 0; r < SIZE; r++) { for (int c = 0; c <= r; c++) { grid.set(c, r, Color.RED); } } } }