How to prevent user from entering certain charcters in \'JTextField\' and if enters that character is entered ,do not show it in the textfield
You can either use a JFormattedTextField or create a custom DocumentFilter.