KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I want to set the maximum length of a JTextField , so that you can't enter more characters than the limit. This is the code I have so far... textField = new JTextField(); textField.setBounds(40, 39, 105, 20); contentPane.add(textField); textField.setColumns(10); Is there any simple way to put a limit on the number of characters?
Tags (comma-separated)
Save Edits
Cancel