Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolution for issue #70 #87

Closed
wants to merge 8 commits into from
15 changes: 8 additions & 7 deletions imagelab/ImageLab.java
Original file line number Diff line number Diff line change
Expand Up @@ -288,13 +288,14 @@ public void actionPerformed(final ActionEvent e) {
fd = new FileDialog(frame, "Pick an image", FileDialog.LOAD);
fd.setVisible(true);
String theFile = fd.getFile();
String theDir = fd.getDirectory();
//System.out.println("The file's name is " + theDir + theFile);
improvider = new ImgProvider(theDir + theFile);
improvider.setLab(theLab);
improvider.showImage(theDir + theFile);
images.add(improvider);
impro = improvider; //current image provider is set
if (theFile != null) {
String theDir = fd.getDirectory();
improvider = new ImgProvider(theDir + theFile);
improvider.setLab(theLab);
improvider.showImage(theDir + theFile);
images.add(improvider);
impro = improvider; //current image provider is set
}
} //actionPerformed
};
} // makeOpenListener
Expand Down