Re: Dialog and image position
Posted by
Michael Schmid on
URL: http://imagej.273.s1.nabble.com/Dialog-and-image-position-tp5002536p5002537.html
Hi Sombreroduck,
if you don't call the centerDialog(false) method of your GenericDialog, it will be always centered on the screen.
Michael
________________________________________________________________
On Apr 4, 2013, at 12:16, sombreroduck wrote:
> Hi,
> I am writing a plugin, but at one point the dialog box always lands on top
> of the image. I've tried using genericDialog's setLocation(x,y) but it is
> ignored and is always in the same place no matter which (x,y) I use. Does
> anyone know why? and how I can fix it?
> (also, if you know how to set the location of the FFT image on the screen I
> would be much obliged)
>
> This is the section of relevant code
> (back-story: I've just run an FFT which appears in a new window)
>
> [...]
> new WaitForUserDialog("Title", "Draw rectangules around maxima, then click
> OK.").show();
> fftroi=impFFT.getRoi();
> IJ.run("Find Maxima...", "noise="+noise+" output=[Point Selection] [Exclude
> edge maxima] [Preview point selection]");
>
> GenericDialog again = new GenericDialog("Klar?");
> again.setCancelLabel("Scrap");
> again.addMessage("Next area? change noise tolerence? or scrap this one and
> move on?");
> again.enableYesNoCancel("Next", "Change");
> again.setLocation(100, 300);
> again.showDialog();
>
> if(again.wasCanceled())
> [etc...]
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html