This is my code below
import javax.swing.*;
import java.awt.*;
public class board2 {
JFrame frame;
JPanel squares[][] = new JPanel[8][8];
public board2()
import java.applet.*;
import java.lang.*;
import java.awt.*;
public class E10_2 extends Applet
{
public void paint(Graphics g)
{
for(int x = 10; x < 330; x+=80)
{
for(int y = 10; y < 330; y+=80)
{
g.drawRect(8,8,322,322);
g.drawRect(9,9,322,322);
g.fillRect(x,y,40,40);
g.fillRect(x+40,y+40,40,40);
}
}
}
}