I'm writing a Sudoku board in Java and opted to use the JFormattedTextField
class for the board cells because I can have a control about the input with providing a correct DecimalFormat
object.
My question is, what String should I use in the constructor of the DecimalFormat
so that it would represent a pattern of a single digit between 1-9.
Alternatively, is there a better class(es) to use for that purpose?
Thanks