Dialog and image position
Posted by sombreroduck on
URL: http://imagej.273.s1.nabble.com/Dialog-and-image-position-tp5002536.html
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...]