Problem with OpenDialog.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Problem with OpenDialog.

Richard VanMetter
The following simple use of OpenDialog doesn't open a dialog. It
compiles, runs and exits normally.
It logs fileName as an empty string. {versions: ImageJ 1.47a, Java
1.7.0_03 (64-bit)}

import ij.*;
import ij.io.*;
import ij.process.*;
import ij.gui.*;
import java.awt.*;
import ij.plugin.*;
import ij.plugin.frame.*;

public class Test_OpenDialog implements PlugIn {

     public void run(String arg) {
         OpenDialog od = new OpenDialog("Enter file ","C:\\");
         String fileName = od.getFileName();
         IJ.log("FileName: "+fileName);
     }

}


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html