所以基本上我一直在几行代码中得到错误,是的,我在第31行错过了一个if条款我已经尝试了有和没有它并且它仍然不起作用,有人可以给我一只手弄清楚我设法搞砸了什么?
主要课程:
package simpleboardgame;
public class RealTile {
public static void main(String[] args) {
Tile newTile = new Tile();
}
}
PACKAGE:
package simpleboardgame;
import java.awt.*;
import javax.swing.*;
import java.util.Random;
public class Tile extends JFrame{
int rowMax = 10;
int columnMax = 10;
int row;
int col;
int n = 0;
public Tile ()
{
JFrame frame = new JFrame();
frame.setLayout(new GridLayout(rowMax, columnMax));
frame.setSize(600,600);
frame.setVisible(true);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JLabel nextLabel = new JLabel();
int[] activeCell = new int[100];
for (int row = 0; row < rowMax; row++)
{
for (int col = 0; col < columnMax; col++);
{
{
nextLabel.setBorder(BorderFactory.createLineBorder(//Color.BLUE ));
nextLabel.setBackground(http://Color.black );
nextLabel.setOpaque(true);
}
else
{
nextLabel = new JLabel();
}
frame.getContentPane().add(nextLabel);
}
}
}
}