Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #2150
| From | "Lee Graba" <lee.graba@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: JTextArea append meth |
| Message-ID | <13ailgpalksg35a@corp.supernews.com> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <f89vq6$og3$1@south.jnrs.ja.net> |
| Date | 2011-04-27 15:37 +0000 |
| Organization | TDS.net |
To: comp.lang.java.gui Nigel Wade wrote: > Andrew Thompson wrote: > >> Andrew Thompson wrote: >>>>>>Is this a bug in JTextArea, or is this some known behavior? >> >> Oh, but besides all that 'rabbiting on', note that >> Swing methods are not 'Thread safe'. >> >> See >> > <http://java.sun.com/javase/6/docs/api/javax/swing/SwingUtilities.html#invokeLater(java.lang.Runnable >> )> >> > > However, JTextArea.append() is one of the few Swing methods which is > thread safe: > <http://java.sun.com/javase/6/docs/api/javax/swing/JTextArea.html#append(java.lang.String)> > > My first thought was that the multiple threads appending to multiple > JTextAreas was the problem, and that wrapping the calls in invokeLater > would be the solution. Since the method is supposed to be thread safe this > ought not to be the case, if this is indeed the class/method which is > being used. It might still be worth trying anyway... > > I agree with your other post. A SSCCE which demonstrates the problem might > shed some light on it. > Actually, I have done this both ways, calling append in a separate thread, and within an invokeLater thread. Same results either way. -- ================= Lee Graba leegraba@visi.com ================= --- * 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
JTextArea append method d "Lee Graba" <lee.graba@THRWHITE.remove-dii-this> - 2011-04-27 15:37 +0000
Re: JTextArea append meth "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:37 +0000
Re: JTextArea append meth "Lee Graba" <lee.graba@THRWHITE.remove-dii-this> - 2011-04-27 15:37 +0000
Re: JTextArea append meth "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:37 +0000
Re: JTextArea append meth "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:37 +0000
Re: JTextArea append meth "Nigel Wade" <nigel.wade@THRWHITE.remove-dii-this> - 2011-04-27 15:37 +0000
Re: JTextArea append meth "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:37 +0000
Re: JTextArea append meth "Nigel Wade" <nigel.wade@THRWHITE.remove-dii-this> - 2011-04-27 15:37 +0000
Re: JTextArea append meth "Lee Graba" <lee.graba@THRWHITE.remove-dii-this> - 2011-04-27 15:37 +0000
Re: JTextArea append meth "Tom Hawtin" <tom.hawtin@THRWHITE.remove-dii-this> - 2011-04-27 15:37 +0000
Re: JTextArea append meth "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:37 +0000
Re: JTextArea append meth "Lee Graba" <lee.graba@THRWHITE.remove-dii-this> - 2011-04-27 15:37 +0000
Re: JTextArea append meth "Roedy Green" <roedy.green@THRWHITE.remove-dii-this> - 2011-04-27 15:37 +0000
Re: JTextArea append meth "tar" <tar@THRWHITE.remove-dii-this> - 2011-04-27 15:37 +0000
csiph-web