repaint();
}
protected void paintComponent(Graphics g)
{
Configuration config = Configuration.getIstance();
g.setColor(getCurrentColor());
g.fill3DRect(0, 0, getWidth(), getHeight(), true);
int hintMode = config.getInteger("sudoku.ui.hintMode");
Integer value = this.cell.getValue();
Set<Integer> allowedValues = cell.getAllowedValues();
if (value != null)
drawNumber(value.toString(), g,
config.getColor("sudoku.ui.cell.textColor"), 0, 0,
getWidth(), getHeight());
else if (((isFocusOwner() && hintMode > 0) || hintMode == 2)
&& allowedValues != null)
{
int boardSize = config.getInteger("sudoku.core.size");
int width = getWidth() / boardSize;
int height = getHeight() / boardSize;
Color allowedValuesTextColor = config.getColor("sudoku.ui.cell.hintsTextColor");
for (Integer val : allowedValues)
{
int x = ((val.intValue() - 1) % boardSize) * width;
int y = ((val.intValue() - 1) / boardSize) * width;