Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
您好,我想用JFormattedTextField这种方式戴口罩:
JFormattedTextField
MaskFormatter mask = new MaskFormatter("AA AAAA AAAA"); myField = new JFormattedTextField(mask);
但我希望能够输入可变数量的字符,例如:
aa 11 4a 1125 4
等等
有什么简单的方法可以做到这一点,而不是扩展maskformatter或编写我自己的类?
maskformatter
感谢你