How to size a JTextField according to a fixed string length?



How do I size a JTextField, such that I know for a fact that it can display a certain string lenght? I do not want the field to grow or shrink according to content, it should be fixed upon initial creation.

Thanks in advanced,
Casper

.



Relevant Pages