final int DELAY_IN_MSEC = 100; // All caps means CONSTANT -- final enforces it!
...
try {
Thread.sleep(DELAY_IN_MSEC);
} catch (Exception e) {}
Arrays.equals(array1, array2) does not work!public void paint(Graphics g)
public void paint(Graphics g) {
g.setColor(Color.red);
g.fillRect(100,100,40,40);
}
g.drawLine(x1, y1, x2, y2) is the method to draw a line).