I am having trouble with the same thing as this guy:
MigLayout JTextArea is not shrinking when used with linewrap=true
and I used the solution described in one o
Not really sure what you're trying to achieve here, try running this and see if it fits your need?
public class MiGTest2 extends JFrame {
public MiGTest2() {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
JPanel panel = new JPanel(new MigLayout("fillx, debug", "[fill]"));
JTextArea textArea = new JTextArea();
textArea.setLineWrap(true);
panel.add(new JScrollPane(textArea), "wmin 10, grow, push");
setLayout(new MigLayout("fill"));
JScrollPane scrollPane = new JScrollPane(panel);
add(scrollPane, "grow, push");
pack();
}
public static void main(String[] args) {
new MiGTest2().setVisible(true);
}
}