Article View: borland.public.jbuilder.java.swing
Article #59How to control the viewport of JTextPane?
From: Aven
Date: Fri, 02 Dec 2005 03:22
Date: Fri, 02 Dec 2005 03:22
15 lines
1302 bytes
1302 bytes
Hello, When I append some strings to the document of a JTextPane, e.g., Document doc = textPane.getDocument(); doc.insertString(doc.getLength(),"hello\n"); The scrolling pane that contains JTextPane scrolls automatically. I don't want this to happen when the viewport is not at the end of the document. How can I do that? Thank you. Regards, Aven
Technical Details
Message-ID:
<438fbd61$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 111d45,b476a0d90664e737,start X-Google-Attributes: gid111d45,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Aven" <aven_02@yahoo.com> Newsgroups: borland.public.jbuilder.java.swing Subject: How to control the viewport of JTextPane? Date: Thu, 1 Dec 2005 19:22:43 -0800 Lines: 17 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 NNTP-Posting-Host: 128.111.68.241 Message-ID: <438fbd61$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1133493601 128.111.68.241 (1 Dec 2005 19:20:01 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!news-out.newsfeeds.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail