Re: Image J plugin window
Posted by
Peterbauer Thomas on
Dec 10, 2016; 8:58pm
URL: http://imagej.273.s1.nabble.com/Image-J-plugin-window-tp5017749p5017750.html
On 2016-12-10 21:15, boomer2016 wrote:
> Hi, I'm having trouble with a plugin for ImageJ, I want to be able to open up
> a new UI with menu's and buttons for functions. I have no idea how to create
> the new window.
Let your plugin extend ij.plugin.frame.PlugInFrame. This will construct
and show a java.awt.Frame. If you want a javax.swing.JFrame, you can
implement the ij.plugin.PlugIn interface and construct it in the run()
method. The JFrame will, however, not pop up in IJ's "Window" menu. You
have to register it at the WindowManager on your own (and de-register it
on closing); for frames extending PlugInFrame, all this and proper
numbering of more than one instance is done by the PlugInFrame superclass.
Best,
Thomas
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html