mdoland
asked on
Constant size JTextArea and JTextField
How do I make the JTextArea and JTextField to be of a certain size no matter to what I set i t to contain?
Provide a custom Document for the components. Override PlainDocument,insertString to allow only a certain length of String
depends on the layout manager being used, but setting the preferred size on most will achieve that
ASKER
I want this to work for 1.4.1 and this solution doesn't seem to work here. What would you do?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Great, finally got it working. Love it!!
sorry misunderstood what you need.
the folowojgn shows what you need
http://helpdesk.objects.com.au/java/how-to-limit-number-of-characters-in-jtextfield
the folowojgn shows what you need
http://helpdesk.objects.com.au/java/how-to-limit-number-of-characters-in-jtextfield
:-)