Login  Register

Re: "WaitForUserDialog" doesn't work in my "ActionListener" plugin

Posted by dscho on Oct 28, 2009; 1:12pm
URL: http://imagej.273.s1.nabble.com/WaitForUserDialog-doesn-t-work-in-my-ActionListener-plugin-tp3690634p3690635.html

Hi,

On Wed, 28 Oct 2009, Ghislain BUGNICOURT wrote:

> My goal is to use "WaitForUserDialog" in a plugin that gathers my
> self-made processes. I tried to simplify my plugin in the attached
> document ("_Truc", just add ".java" to use). The first occurence of
> "WaitForUserDialog" works fine. The second one, whithin an
> "actionPerformed", blocks ImageJ completely.

The actionPerformed() method is called in the event handling thread.  So I
guess the problem can be fixed by launching the dialog from a newly
started thread.

Hth,
Dscho