This is my code below
import javax.swing.*;
import java.awt.*;
public class board2 {
JFrame frame;
JPanel squares[][] = new JPanel[8][8];
public board2()
Go here. This shows some of the different layouts you can use. One thing you may want to look into is the grid layout. This would make it easy for you to add JPanels for the squares. You could also use it to add labels around the board, but that is just one way of doing it. Go through the examples on the site, there is example code too.