Skip to content
Snippets Groups Projects
Commit 6ed3ead3 authored by Malvika.Singh's avatar Malvika.Singh
Browse files

Update src/main/java/no/uib/inf101/gridview/Main.java

parent 29287071
No related branches found
No related tags found
No related merge requests found
package no.uib.inf101.gridview; package no.uib.inf101.gridview;
import java.awt.Color;
import javax.swing.JFrame;
import no.uib.inf101.colorgrid.CellPosition;
import no.uib.inf101.colorgrid.ColorGrid;
public class Main { public class Main {
public static void main(String[] args) { public static void main(String[] args) {
// TODO: Implement this method ColorGrid grid = new ColorGrid(3, 4);
grid.set(new CellPosition(0,0), Color.RED);
grid.set(new CellPosition(0,3), Color.BLUE);
grid.set(new CellPosition(2,0), Color.YELLOW);
grid.set(new CellPosition(2,3), Color.GREEN);
GridView canvas = new GridView(grid);
JFrame frame = new JFrame();
frame.setTitle("INF101");
frame.setContentPane(canvas);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment