posted 11 years ago
I have set a GridBagLayout so that it span only one column, when it is fully expanded due to fill = GridBagConstraints.HORIZONTAL;, I can see it extend about 1/3th size of the
form, however, when it is none, it shrinks to about a couple of pixels of the width. I set the JTextField by
JTextField tf = new JTextField(50);
how can I set the width of the component according to my will?
Thanks
Jack