JScrollPane does not resize
From: Tarlika Elisabeth Schmitz (mail_at_cranntara.net)
Date: 05/29/04
- Next message: Frank D. Greco: "Swing, tail -f and threading"
- Previous message: Andrew Thompson: "Re: Java Tabbed Pane problem"
- Next in thread: Andrew Thompson: "Re: JScrollPane does not resize"
- Reply: Andrew Thompson: "Re: JScrollPane does not resize"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 29 May 2004 17:14:22 +0100
Hello,
I display a JTextArea in a JScrollPane.
jTextArea.setColumns(col) does not cause the scrollpane to resize
automatically. I checked the jTextArea's preferredSize before and after
the setColumns() call - the width does change.
But it is not until I explicitly execute jPane.setPreferredSize() that
the resize takes effect.
I tried invalidate() on the textarea, the viewport and the scrollpane -
to no avail.
Any ideas input is most welcome.
Regards,
Tarlika Elisabeth Schmitz
- Next message: Frank D. Greco: "Swing, tail -f and threading"
- Previous message: Andrew Thompson: "Re: Java Tabbed Pane problem"
- Next in thread: Andrew Thompson: "Re: JScrollPane does not resize"
- Reply: Andrew Thompson: "Re: JScrollPane does not resize"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|