gridLayout を作成して画像で埋めようとしていますが、どこが間違っていますか?
ImageIcon grassIcon = new ImageIcon("images/grass_tile.jpg");
JPanel panel = new JPanel(new GridLayout(haps,snaps,0,0));
JLabel labels[] = new JLabel[(haps*snaps)];
for (int i = 0; i < haps*snaps; i++)
{
labels[i] = new JLabel(grassIcon);
panel.add(labels[i]);
}
frame.add(panel);