How redisplay ImagePlus window after being closed?
Posted by whoiswho on May 19, 2010; 12:14am
URL: http://imagej.273.s1.nabble.com/How-redisplay-ImagePlus-window-after-being-closed-tp3687861.html
Hi,
I'm currently working on a plugin for ImageJ but have run into a problem regarding windows.
I currently have an ImagePlus object -- let's name it imp -- containing a stack of images. It pops up nicely using imp.show() the first time. After closing the window (via the close button) associated with this ImagePlus, I try using imp.show() to display the window again, but nothing happens.
I have a few questions about this:
1. What actually happens when you manually close the window (to an ImagePlus)? Same as calling imp.close()?
2. What are the different ways to accomplish displaying the window for the ImagePlus after it's been closed?
3. Is there a way to modify the window close behaviour (for windows obtained by ImagePlus.show()), e.g. hide the window instead of closing it. Preferably _before_ the window has been displayed. For instance, for JFrame there is the setDefaultCloseOperation method that accomplishes this.
Thanks!
Best regards
whoiswho