0

The horizontal layout:

layout.setHorizontalGroup(
         layout.createSequentialGroup()
          .addComponent(find)
          .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
                  .addComponent(input, 0, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                  .addComponent(amountWords, 0, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                  .addComponent(displayWords, 0, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
          .addComponent(clearButton)
    );

The vertical layout:

layout.setVerticalGroup(
            layout.createSequentialGroup()
             .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
                  .addComponent(find)
                  .addComponent(input)
                  .addComponent(clearButton))
             .addComponent(amountWords)
             .addComponent(displayWords)
       );

I'm trying the make the input (JTextField), amountWords (JLabel) and the displayWords (JTextArea) resizable depending on the width and height of the screen. The height/length of the display words is already resizing depending of the height of the screen.

But how can I make the JTextField and the JTextArea resizable? Thanks!

Lonneke
  • 11
  • 1
  • 2
  • *"The height/length of the display words is already resizing "* and *"how can I make the JTextField and the JTextArea resizable?"* contradict. You say that the `JTextArea` is already resizing and then ask how to resize it? – user1803551 Oct 17 '14 at 00:53
  • Also, what are `input` and `clearButton`? (Edit your question with the answer.) – user1803551 Oct 17 '14 at 01:01

0 Answers0