Re: waiting message

From: Raymond DeCampo (rdecampo_at_spam-I-am-not.twcny.rr.com)
Date: 12/20/03

  • Next message: Raymond DeCampo: "Re: Flipping Y axis in a Graphics 2D??"
    Date: Sat, 20 Dec 2003 05:26:19 GMT
    
    

    Charles Fineman wrote:
    > You would have to launch the remote request in a different thread (which
    > you should be doing anyway if you are currently launching the request
    > within an Action or something like that... you are basically blocking
    > the whole event thread by doing that).

    Yes.

    > I'm no guru w.r.t. Swing thread
    > saftey issues but I would imagine that you would still be able to call
    > setters on the dialog from the other thread and get it to redisplay
    > properly.
    >

    Actually, while this usually works in practice it is technically
    incorrect. If your code affects Swing components it should execute
    within the Swing thread. This can be accomplished by using the
    SwingUtilities.invokeLater() method.

    Ray


  • Next message: Raymond DeCampo: "Re: Flipping Y axis in a Graphics 2D??"

    Relevant Pages

    • Re: waiting message
      ... Charles Fineman wrote: ... > You would have to launch the remote request in a different thread (which ... If your code affects Swing components it should execute ...
      (comp.lang.java.programmer)
    • Re: waiting message
      ... Charles Fineman wrote: ... > You would have to launch the remote request in a different thread (which ... If your code affects Swing components it should execute ...
      (comp.lang.java.gui)