Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #4868

Re: Canvas Wanted (simple question)

From "John B. Matthews" <nospam@nospam.invalid>
Newsgroups comp.lang.java.gui
Subject Re: Canvas Wanted (simple question)
Date 2011-12-24 11:22 -0500
Organization The Wasteland
Message-ID <nospam-07FE46.11223324122011@news.aioe.org> (permalink)
References <4ee52877$0$5797$65785112@news.neostrada.pl> <jc3fu9$31u$1@dont-email.me> <8lxthes2ckbz.x1cfm0fm94x5$.dlg@40tude.net> <nitpicking-20111224131409@ram.dialup.fu-berlin.de> <1lcrknlsam7de$.10idi2xjwiu5t.dlg@40tude.net>

Show all headers | View raw


In article <1lcrknlsam7de$.10idi2xjwiu5t.dlg@40tude.net>,
 Joerg Meier <joergmmeier@arcor.de> wrote:

> On 24 Dec 2011 12:15:16 GMT, Stefan Ram wrote:
> 
> > Joerg Meier <joergmmeier@arcor.de> writes:
> >>Just a small nitpicking note, this code block doesn't need to be wrapped in
> >>invokeLater (because there is no EDT before the setVisible, so there are no
> >>threading concerns).
> >   The rule used to be until about 2006:
> 
> >       »Once a Swing component has been realized, all code that
> >       might affect or depend on the state of that component
> >       should be executed in the event-dispatching thread.«  
> 
> >   Since about 2006:
> 
> >       »Some Swing component methods are labelled "thread safe"
> >       in the API specification; these can be safely invoked
> >       from any thread. All other Swing component methods must
> >       be invoked from the event dispatch thread.«
> 
> My bad, it seems I was relaying outdated knowledge. Thanks for the update!

If I may amplify: Since about 2011, some formerly "thread safe" methods 
have lost the implied warranty. JTextArea#append() is an example.

<http://docs.oracle.com/javase/6/docs/api/javax/swing/JTextArea.html>
<http://docs.oracle.com/javase/7/docs/api/javax/swing/JTextArea.html>

-- 
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>

Back to comp.lang.java.gui | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Canvas Wanted (simple question) Paweł Lampe <scony@sconysoft.com> - 2011-12-11 22:02 +0000
  Re: Canvas Wanted (simple question) Knute Johnson <nospam@knutejohnson.com> - 2011-12-11 15:55 -0800
    Re: Canvas Wanted (simple question) Joerg Meier <joergmmeier@arcor.de> - 2011-12-24 01:49 +0100
      Re: Canvas Wanted (simple question) markspace <-@.> - 2011-12-23 17:26 -0800
        Re: Canvas Wanted (simple question) Joerg Meier <joergmmeier@arcor.de> - 2011-12-24 03:41 +0100
          Re: Canvas Wanted (simple question) markspace <-@.> - 2011-12-23 21:42 -0800
            Re: Canvas Wanted (simple question) Joerg Meier <joergmmeier@arcor.de> - 2011-12-24 14:16 +0100
              Re: Canvas Wanted (simple question) markspace <-@.> - 2011-12-24 06:47 -0800
      Re: Canvas Wanted (simple question) Knute Johnson <nospam@knutejohnson.com> - 2011-12-23 21:21 -0800
        Re: Canvas Wanted (simple question) markspace <-@.> - 2011-12-23 21:48 -0800
      Re: Canvas Wanted (simple question) Joerg Meier <joergmmeier@arcor.de> - 2011-12-24 14:20 +0100
        Re: Canvas Wanted (simple question) "John B. Matthews" <nospam@nospam.invalid> - 2011-12-24 11:22 -0500
  Re: Canvas Wanted (simple question) Roedy Green <see_website@mindprod.com.invalid> - 2011-12-12 09:58 -0800
  Re: Canvas Wanted (simple question) Paweł Lampe <scony@sconysoft.com> - 2011-12-14 15:57 +0000
    Re: Canvas Wanted (simple question) Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-12-14 10:21 -0800

csiph-web