M
me
I'm attempting to place a textfield, using GridBagLayout. The syntax
I'm using is
addComp(jtf, gbLayout, gbConstraints, 0, 0, 1, 4, 0, 0);
with 'jtf' being the textfield. Its my understanding that this should
create the textfield, in row 0, column 0, with a height of 1 row, and
a width of 4 columns. When run, this creates a textfield that is in
the center of row 0, but is of a massively compressed size.(The two
end lines and a sliver of white) Strangely, when the same syntax is
used to place a JLabel in the same place, it works fine, with the
label spanning the whole width that it should. I've attempted to
change the size of the JTextField when its created, but to no avail,
even when its set to a wider width than exists in the frame. Any
suggestions on why this is, or how to get around this issue??
Sorry if this double posted, the news server I'm on seems screwy
tonight.
Mark
I'm using is
addComp(jtf, gbLayout, gbConstraints, 0, 0, 1, 4, 0, 0);
with 'jtf' being the textfield. Its my understanding that this should
create the textfield, in row 0, column 0, with a height of 1 row, and
a width of 4 columns. When run, this creates a textfield that is in
the center of row 0, but is of a massively compressed size.(The two
end lines and a sliver of white) Strangely, when the same syntax is
used to place a JLabel in the same place, it works fine, with the
label spanning the whole width that it should. I've attempted to
change the size of the JTextField when its created, but to no avail,
even when its set to a wider width than exists in the frame. Any
suggestions on why this is, or how to get around this issue??
Sorry if this double posted, the news server I'm on seems screwy
tonight.
Mark