If I had a JFormattedTextField like this
MaskFormatter formatter = new MaskFormatter("#,#");
JFormattedTextField textField = new JFormattedTextField(formatter);
and if I had variables
int x = 0;
int y = 0;
how can I store the first number in the textfield to x, and the second number to y?
Assuming the first & second numbers are those either side of the comma
,in theJFormattedTextField, you could do: