Re: How to start on debugging this Swing/AWT error?

From: Thomas G. Marshall (tgm2tothe10thpower_at_hotmail.replaceTextWithNumber.com)
Date: 10/17/03


Date: Fri, 17 Oct 2003 15:39:39 GMT

arnet@hpcvplnx.cv.hp.com <arnet@hpcvplnx.cv.hp.com> coughed up the
following:

> arnet@hpcvplnx.cv.hp.com wrote:
>> arnet@hpcvplnx.cv.hp.com wrote:
>
>>> I'm trying to find out if this is a bug in JDK1.3 or in the code
>>> itself. Someone mentioned "bugparade", a pointer would be
>>> appreciated. Right now I'm checking on the internet in general to
>>> see what I can find.
>
>> I got "bugparade" figured out. I'm still looking tho'
>
> Looks like a flavor of "Swing is not threadsafe". Sound right to
> anyone? In the meantime I think I'll modify the code to deiconize the
> windows up in response to an action, instead of directly.

Most every swing component needs to be mutated in the awt event dispatching
thread. Note that if your code is /already/ within that thread as a result
of a callback to a listener, then you can access the component directly.

http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/SwingUtilities.html#invokeLater(java.lang.Runnable)

Note that if your problem is not infintely repeatable, it might not be the
issue.

>
> --arne
>
> DISCLAIMER: These opinions and statements are those of the author and
> do not represent any views or positions of the Hewlett-Packard Co.