You could also come up with your own window using a JTextField if you really wanted to limit the number of characters. There are a number of ways to accomplish this. I suggest googling something like...
Type: Posts; User: KevinWorkman
You could also come up with your own window using a JTextField if you really wanted to limit the number of characters. There are a number of ways to accomplish this. I suggest googling something like...
Why don't you just check the length of the String, and then re-prompt the user if it's not in a valid range?
What exactly do you mean? What do you mean by "allowed"? What should happen if a String with a greater length is created? When are the Strings created?