Login  Register

Re: Preventing an ImageWindow from closing

Posted by dscho on Jul 10, 2008; 10:30pm
URL: http://imagej.273.s1.nabble.com/Preventing-an-ImageWindow-from-closing-tp3695624p3695625.html

Hi,

On Thu, 10 Jul 2008, Jeff Hardin wrote:

> Does anyone know how to prevent an ImageJ ImageWindow from closing? I
> currently have images being displayed to an ImageWindow, and everything
> works well, until someone inadvertently closes the window. I know how to
> deal with this in Swing, but not AWT...

AFAICT you could extend ImageWindow, overloading windowClosing() so
that it does not dispose().  Then set this newly created ImageWindow.

A much dirtier solution is to extend ImageWindow with a static method
setting your _real_ ImageWindow's 'closed' property to true.

Hth,
Dscho

P.S.: BTW you _did_ have to quote the whole unrelated digested mail,
wasting everybody's bandwidth, didn't you?