I have a JPanel that uses the GridBag layout to position controls. One of the controls is a JTextField. I create it with the following code:
JTextArea ta = new JTextArea("default text");
ta.setBorder( new LineBorder( Color.blue, 1) );
ta.MiminumSize( new Dimension(20,20) );
Regardless of the default text and minimum size, the initial height and width of the JTextField are the same.
Can anyone tell me how I get the JTextField dimensions to be constant?
Thanks!
JTextArea ta = new JTextArea("default text");
ta.setBorder( new LineBorder( Color.blue, 1) );
ta.MiminumSize( new Dimension(20,20) );
Regardless of the default text and minimum size, the initial height and width of the JTextField are the same.
Can anyone tell me how I get the JTextField dimensions to be constant?
Thanks!