Expand JTextArea size
From: Nigel Underwood (email_at_nigelunderwood.com)
Date: 11/29/04
- Next message: Babu Kalakrishnan: "Re: cut & copy function lost with custom TableCellEditor"
- Previous message: Kleopatra: "Re: cut & copy function lost with custom TableCellEditor"
- Next in thread: Babu Kalakrishnan: "Re: Expand JTextArea size"
- Reply: Babu Kalakrishnan: "Re: Expand JTextArea size"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 29 Nov 2004 15:47:44 -0000
Hi all,
I'd like to be able to automatically resize a JTextArea component depending
on the text and Font that has been entered by a user. Rather than place the
component on a JScrollPane and use a scroll bar to view the text entered,
I'd like to be able to progamatically increase or decrease the height of the
JTextArea as required.
I would like to do this programmatically as there are some other related
things that I would like to happen should the JTextArea be increased or
decreased in height. I've had a look a possibly extending JScrollPane and
JScrollBar to trap the drawing of a scroll bar, and then hence increase the
JTextArea height, but I am sure there must be another way to do this easily.
Any suggestions would be greatefully received.
Regards
Nigel.
- Next message: Babu Kalakrishnan: "Re: cut & copy function lost with custom TableCellEditor"
- Previous message: Kleopatra: "Re: cut & copy function lost with custom TableCellEditor"
- Next in thread: Babu Kalakrishnan: "Re: Expand JTextArea size"
- Reply: Babu Kalakrishnan: "Re: Expand JTextArea size"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|