posted 17 years ago
Hi friends.
I have a funny problem:
In a panel with GridBagLayout ,I have a JTextField witch has bean added to panel by this parameters :
myPanel.add(myJTextField, new GridBagConstraints(2, 1, 1, 1, 1.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.HORIZONTAL, new Insets(2, 0, 0, 5), 1, 0));
It's set to be resized Horizontally when the form resizes! The problem is when the user types in this text field and reaches the end of in (Visualy I mean ) the myJTextField resizes itself to a bigger size !!!
what should I do to prevent this ? and I don't want to use setMax.... and such methods. I want it to be resized only when the panel resizes , not when the user types in it!!! ....
Thanks
"The greatest pleasure in life is doing what people say you cannot do." --Walter Bagehot<p>SCJP 1.4<br />SCWCD 1.3</p>