I know that there are probably hundreds of posts dealing with this exact question, but for the life of me, I cannot figure anything out. I have this "Open" case in this program I have committed myself to finishing, as a beginning Java exercise. I've gotten the Save function to work, but looking at that gets me no closer to trying my problem. Here is my code.
if(arg.equals(Editor.fileLabels[0])){
if(Editor.VERBOSE)
System.err.println(Editor.fileLabels[0] +
" has been selected");
filedialog = new FileDialog(editor, "Open File Dialog", FileDialog.LOAD);
filedialog.setVisible(true);
if(Editor.VERBOSE){
System.err.println("Exited filedialog.setVisible(true);");
System.err.println("Open file = " + filedialog.getFile());
System.err.println("Open directory = " + filedialog.getDirectory());
}
}
I have tried solutions before writing this question; however, all of the examples I've seen are separate methods of their own. Any help would be appreciated. :)