NickName:Arkam Ask DateTime:2018-06-19T21:32:27 jTextField accept only one dot in java calculator? I have created a simple calculator in java using net beans. In this calculator when user accidentally press dot button(jButton) multiple time textfield shows many dots as user pressed. for example if user press dot button after five three times it appears like 5... so I need to set a jTextField to accept only one dot when input user press dot button. dot can't be pressed more than once. How can I do this? Copyright Notice:Content Author:「Arkam」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.Link to original article:https://stackoverflow.com/questions/50929783/jtextfield-accept-only-one-dot-in-java-calculator Answers