JLabel implements TableCellRenderer
sudokuTable = new JTable(){
public void paintComponent(Graphics g) {
super.paintComponent(g);
Graphics2D g2 = (Graphics2D)g;
Rectangle rect = getCellRect(0, 0, true);
g2.setStroke(new BasicStroke(2f));
int y = (int)rect.getHeight()*3;
int x = (int)rect.getWidth()*3+1;
g2.drawLine(0, y, getSize().width, y);
g2.drawLine(x, 0, x, getSize().height);
y = (int)rect.getHeight()*6;
x = (int)rect.getWidth()*6+2;
g2.drawLine(0, y, getSize().width, y);
g2.drawLine(x, 0, x, getSize().height);
}
};