howto use JFormattedTextField allowing only letters and numbers
- by Erik
I have this code and cannot get MaskFormatter right
maskformatter
MaskFormatter formatter = null;
try {
formatter = new MaskFormatter("HHHHHHH");
} catch (ParseException e) {
e.printStackTrace();
}
txtTroll = new JFormattedTextField(formatter);
I need Any hex character (0-9, a-f or A-F) and the "H" should
give me only (0-9, a-f or A-F) but im getting it wrong.
When i type text only capital letters are typed and it's slow to
and when i click away from the txtTroll all letters vanish