JTextArea, setPreferredSize, setSize, setMinimumSize, setMaximumSize - nothing works?

2.8k Views Asked by At

I have a JTextArea and it's currently just displayed as a thin line, I can't get it to resize, it won't do anything. It's just too small and won't adjust no matter what properties I change. Can anyone suggest a solution?

private JTextArea outputT;

I adjust the properties:

    outputT = new JTextArea(5, 20);
    outputT.setMargin(new Insets(5, 5, 5, 5));
    outputT.setEditable(false);
    outputT.setPreferredSize(new Dimension(550, 50));
1

There are 1 best solutions below

6
On

I have a JTextArea and it's currently just displayed as a thin line,

is required