Well it is a 16 x 16 grid so I would need to compare 16 text fields
Type: Posts; User: ray3
Well it is a 16 x 16 grid so I would need to compare 16 text fields
I'm creating a hexadecimal sudoku puzzle so I need to compare the strings 0-9 and a-f to make sure there are no repeats. And I was going to display the 2D String array in a grid of JTextFields each...
I changed JTextField sudoku[][] = new JTextField[col][row]; to JTextField sudoku[][] = new JTextField[20][20]; and that got rid of the out of bounds exception but now there is a null pointer...
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 16
at sudoku.SudokuBoard.getPuzzle(SudokuBoard.java:84)
line 84 is: puzzlePanel.add(sudoku[col][row]);
Also if anyone could suggest a way to compare values in the rows and columns in the array. Is it possible to use the compareTo() method to compare the Strings in the text fields? For example compare...
Hello, I have to make a sudoku-like GUI puzzle for a program. I was originally going to do this by using a GridLayout but decided it was easier toedit the JTextFields by making a 2D array of...