I am creating a simple GUI with a few buttons and a text field. I set the window size to to 500x500 and the text field fits on the South perfectly but once i resize the window the text field stays the same size is it possible to make to so when a user resizes the window the text field changes with it.
if you look at 500x500 pic the text field is good once I change it 800x600 pic the text field is does not reach bottom border.
private JTextField txtField;
txtField = new JTextField(37);
JPanel txtPanel = new JPanel();
txtPanel.add(txtField);
frame.getContentPane().add(txtPanel, BorderLayout.SOUTH);