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!