I'm a beginner in Java, and NetBeans. I'm trying to make a simple program where you introduce 2 numbers and their sum gets divided by two. However, I'm using JFormattedTExtField
s and I don't know how to customize the allowed input in them. Basically I'm trying to find out how to:
- Only allow numbers to be entered in
JFormmatedTextField
; - Only allow a certain amount of numbers;