如何在Java中的方括号中仅允许两个字母 [英] How to allow only two letters in square bracket in java

查看:99
本文介绍了如何在Java中的方括号中仅允许两个字母的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Java中的方括号中仅允许两个字母
例如:[AB]这样,我需要给.

How to allow only two letters in square bracket in java
Eg : [AB] like this i need to give .

推荐答案

假设您只想介绍一个[@@](其中@@是两个字母).是吗?

看一下这些链接: http://www.java2s.com/Tutorial/Java/0240__Swing/FormattedMaskedInputnewMaskFormatter.htm [ ^ ]
http://www.java2s.com/Code/Java/Swing-JFC/JFormattedTextFieldaninputmaskforatelephonephone.htm [ ^ ]

您有兴趣搜索输入掩码"或编辑掩码".

祝你好运!
Assuming that you want to be able to introduce only a [@@] (where @@ are two letters) inside an edit box. is that right?

Take a look at those links: http://www.devdaily.com/java/jwarehouse/eclipse/org.eclipse.jface.examples.databinding/src/org/eclipse/jface/examples/databinding/mask/EditMask.java.shtml[^]
http://www.java2s.com/Tutorial/Java/0240__Swing/FormattedMaskedInputnewMaskFormatter.htm[^]
http://www.java2s.com/Code/Java/Swing-JFC/JFormattedTextFieldaninputmaskforatelephonenumber.htm[^]

You are interested on searching for a "INPUT MASK" or "EDIT MASK".

Good luck!


这篇关于如何在Java中的方括号中仅允许两个字母的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆