Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #3524
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!novia!news-out.readnews.com!news-xxxfer.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail |
|---|---|
| From | "ram" <ram@THRWHITE.remove-dii-this> |
| Subject | Re: How to display text m |
| Message-ID | <JTextArea-20080517153019@ram.dialup.fu-berlin.de> (permalink) |
| X-Comment-To | comp.lang.java.gui |
| Newsgroups | comp.lang.java.gui |
| In-Reply-To | <B_hXj.9$%p3.7@newsfe02.lga> |
| References | <B_hXj.9$%p3.7@newsfe02.lga> |
| Content-Type | text/plain; charset=IBM437 |
| Content-Transfer-Encoding | 8bit |
| X-Gateway | time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92] |
| Lines | 40 |
| Date | Wed, 27 Apr 2011 15:45:23 GMT |
| NNTP-Posting-Host | 96.60.20.240 |
| X-Complaints-To | news@tds.net |
| X-Trace | newsreading01.news.tds.net 1303919123 96.60.20.240 (Wed, 27 Apr 2011 10:45:23 CDT) |
| NNTP-Posting-Date | Wed, 27 Apr 2011 10:45:23 CDT |
| Organization | TDS.net |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.java.gui:3524 |
Show key headers only | View raw
To: comp.lang.java.gui "Jeff Higgins" <oohiggins@yahoo.com> writes: >than the other text components. Because they are so powerful and flexible, >styled text components typically require more initial programming to set >up and use. A JTextArea also has some more difficult aspects. For example, when one wants a line appended at the end to be visible (a common case), with a JTextArea in a JScrollpane, sometimes one needs to call +scrollRectToVisible2 with the offset of the last line, so one needs to call +getLineEndOffset(line)2, which sometimes might throw a BadLocationException, which also needs to be handled. But such boilerplate code does not matter that much when one is subclassing to get a custom log text area component from a Swing text component, because it all can be written once and then be hidden behind methods of the custom log component. >Prefer JTextArea for multi-line unstyled text. JTextPane and JEditorPane also allow multi-line unstyled text, and when subclassing to get a custom log text window, boilerplate code needs only be written once (actually just copied from tutorials), so the difficulty to use does not matter that much. So I wonder, whether from the point of visible properties of the product (what one observes when the program with the log window is running), there would ever be a reason to prefer JTextArea above JTextPane or JEditorPane. For example, if JTextPane would be known to be slower than JTextArea, this would be such a reason. --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.gui | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to display text messa "ram" <ram@THRWHITE.remove-dii-this> - 2011-04-27 15:45 +0000
Re: How to display text m "Jeff Higgins" <jeff.higgins@THRWHITE.remove-dii-this> - 2011-04-27 15:45 +0000
Re: How to display text m "ram" <ram@THRWHITE.remove-dii-this> - 2011-04-27 15:45 +0000
Re: How to display text m "Jeff Higgins" <jeff.higgins@THRWHITE.remove-dii-this> - 2011-04-27 15:45 +0000
Re: How to display text m "ram" <ram@THRWHITE.remove-dii-this> - 2011-04-27 15:45 +0000
Re: How to display text m "Jeff Higgins" <jeff.higgins@THRWHITE.remove-dii-this> - 2011-04-27 15:45 +0000
Re: How to display text m "ram" <ram@THRWHITE.remove-dii-this> - 2011-04-27 15:45 +0000
Re: How to display text m "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:45 +0000
csiph-web