I am trying to learn how to do things in swing, and I wonder if someone could help me with a component resize problem.
I am using the default JFrame border layout. The North panel contains a JLabel, a JTextField, and a JButton. The Center panel contains a scrollable JTextArea (a JTextArea embedded in a JScrollPane) and nothing else.
Suppose, however, the customer clicks the Maximize button, perhaps because a particular query results in a lot of text. As expected, the window maximizes, the components move around, but nothing changes size. What I would like have happen is for all the components to continue to do this except for the JTextArea. I want it to expand to fill all the available space. In other words, the JTextArea should automatically resize whenever the window is resized.
How do you do this?