Why won't TextField display as a single line when using GridLayout?

publicvoid init(){

setLayout(new GridLayout(0, 2));

add(new TextField(20));

}

This displays a text box whose height will fill up the entire applet.

What gives?

This is for a homework so I have to use what the prof wants (gridlayout)

[460 byte] By [smiles78a] at [2007-10-3 10:51:39]
# 1
Apparently the layout manager or the container will increase the size of the widget to take up the available space, rather than adding whitespace.Make your applet smaller if you don't like it.
paulcwa at 2007-7-15 6:17:01 > top of Java-index,Desktop,Core GUI APIs...
# 2
Thanks, but if I make it shorter in height my List get screwed up
smiles78a at 2007-7-15 6:17:01 > top of Java-index,Desktop,Core GUI APIs...