private void updateContents() {
try {
StyledDocument tileDoc = getStyledDocument();
setBackground(COLOR_TILE);
setForeground(Color.BLACK);
Letter letter = tile.getLetter();
append(tileDoc, String.valueOf(letter.getSymbol()), "large");
if (letter.getValue() > 0) {
append(tileDoc, String.valueOf(letter.getValue()), "small");
}
} catch (BadLocationException e) {
throw new IllegalStateException(e);
}
}