Is there any way to accept only numeric values in a JTextField?

前端 未结 19 2138
陌清茗
陌清茗 2020-11-22 03:10

Is there any way to accept only numeric values in a JTextField? Is there any special method for this?

19条回答
  •  梦如初夏
    2020-11-22 04:12

    You can create a beautiful text field in java that accepts or allows only numeric values.. You can even set the precision for the float values... check the code in zybocodes

提交回复
热议问题