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.
如何将自定义文本约束添加到 JTextField?
例如,我希望用户提供以下格式的输入: 12-100 78-023
您是否尝试过使用JFormattedTextField?听起来正是您所需要的。