hey guys,
Basically I want to make a JPanel, and fill it with a 9x9 grid of text fields.
This is what I'm doing:
// make 9x9 array of text fields
JTextField[][] board = new JtextField[9][9];
// make individual fields?
for(int i = 0; i < 9; ++i)
for int j = 0; j < 9; ++j)
board[i][j] = new JtextField(2);
// make new JPanel
JPanel numberPanel = new JPanel();
numberPanel.setLayout(new GridLayout(9,9));
I'm confused as to how to actually get the array of text fields into the panel. Is there a logical way to do this? Am I overlooking something?
Thanks very much in advance.