JFormattedTextField is not properly cleared

前端 未结 3 1716
长情又很酷
长情又很酷 2020-11-22 10:58

I am doing this assignment, make a program that solves sudoku. I have a panel with a grid of SudokuTextBox extends JFormattedTextField. I have a MaskFormatter so that it onl

3条回答
  •  不知归路
    2020-11-22 11:13

    Ok so now I found it, "One of the shortcomings of the mask formatter is that as of the current implementation (Java 5), it has no support for letting a user revert a field to the blank value (the initial value of the field prior to any user input) once they have left the field at any point."

    So since I am using a MaskFormatter I cannot clear the field.

提交回复
热议问题