What purpose does setColumns have?
843805Apr 6 2006 — edited Apr 7 2006I was trying to limit the users from entering more than 5 characters in a JTextField. I tried to this by setting the columns to 5. This did not work. I understand that there programatical solutions using DocumentListener and such, but it seems like the whole point of setColumns ought to be for this very purpose.
So, my question is, if this is not its purpose, just what is it suppose to do? There already is a setPreferedSize function, so that should not be the answer. But, beyond those two, I cannot come up with another rational for its existence.
Oh, and if there is simple flag that I am missing to restrict the number of columns (or rows, for that matter), I would appreciate that information too.