I'm currently working on my GUI for this Sudoku solver I'm making. I've managed to print out the board with no problems. However I'd like to know how I would go about to differentiate the 3x3 regions with some kind of thicker or coloured line.
Basically something resembling the picture below.
Below is the code I've already implemented. Thanks!
Board = new JPanel(new GridLayout(9, 9));
for(int i= 0; i < 9; i++) {
for(int j = 0; j < 9; j++) {
board[i][j] = new JLabel();
board[i][j].setBorder(BorderFactory.createLineBorder(Color.DARK_GRAY));
Font font = new Font("Arial", Font.PLAIN, 20);
board[i][j].setFont(font);
board[i][j].setForeground(Color.WHITE);
board[i][j].setBackground(Color.WHITE);
board[i][j].setOpaque(true);
board[i][j].setHorizontalAlignment(JTextField.CENTER);
Board.add(board[i][j]);
}
}