Article View: borland.public.jbuilder.java.swing
Article #8489Re: Progrmatically Scrolling a JTextArea in a JScrollPane to the last line
From: Nikolaos Giannopoulos
Date: Tue, 29 Aug 2000 00:00
Date: Tue, 29 Aug 2000 00:00
20 lines
1237 bytes
1237 bytes
A real easy way is:
jTextArea1.moveCaretPosition(0);
--Nikolaos
Larry Maturo wrote:
> I want to use a JTextArea for output only, and I want the last line I
> append to be visible at the bottom of the JTextArea. I also want a
> user to be able to scroll-up to look at eariler messages if he needs
> to, otherwise I would just use a JLabel.
>
> I can't find any way to programatically scroll to the bottom after
> I use append to add a line at the bottom. It seems like it should
> be simple, but apparently it isn't.
>
> -- Larry Maturo
> lmaturo@athensgroup.com
Technical Details
Message-ID:
<39AC2DCF.9841530E@solmar.ca>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<39a6c7bb_2@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111d45,a51abcebed13651a X-Google-Attributes: gid111d45,public From: Nikolaos Giannopoulos <nikolaos@solmar.ca> Subject: Re: Progrmatically Scrolling a JTextArea in a JScrollPane to the last line Date: 2000/08/29 Message-ID: <39AC2DCF.9841530E@solmar.ca> X-Deja-AN: 664067431 Content-Transfer-Encoding: 7bit References: <39a6c7bb_2@dnews> To: Larry Maturo <lmaturo@athensgroup.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: Another Netscape Collabra Server User Mime-Version: 1.0 Newsgroups: borland.public.jbuilder.java.swing