package eecs1022; import java.awt.Color; import javax.swing.JOptionPane; import franck.Grid; public class MultipleColors { public static void main(String[] args) { Grid grid = new Grid(1); String input = JOptionPane.showInputDialog("Please enter your choice"); int choice = Integer.parseInt(input); switch (choice) { case 0 : grid.set(0, Color.RED); break; case 1 : grid.set(0, Color.BLUE); break; case 2 : grid.set(0, Color.YELLOW); break; case 3 : grid.set(0, Color.CYAN); break; case 4 : grid.set(0, Color.MAGENTA); break; case 5 : grid.set(0, Color.ORANGE); break; case 6 : grid.set(0, Color.PINK); break; default: grid.set(0, Color.BLACK); break; } } }