Originally posted by RaviSingh Kumar:
Added text field in a panel(Using Gridlayout) and that panel to a frame.
The size of textfield get increases as window size increase.
Wanted some combination of layout to fix this bug.
Well that's how GridLayout works.
If you consider it a bug then either use an intervening panel or use a different layout completely.
By intervening panel I mean replace
add(yourTextField); with
JPanel flowPanel = new JPanel();
flowPanel.add(yourTextField);
add(flowPanel);
// yourTextField.setColumns(width) may also be necessary, depending