So in that example, the message isn't printed? That's completely screwed up. What JDK do you have?Code:public static void X(JTextField jtf){ String filepath = jtf.getText(); try{ FileReader fr = new FileReader(filepath); System.out.println("WOOHOO!"); }catch(Exception e){ JOptionPane.showMessageDialog(GUI, " Unable to find file requested " + " Please try again "); jtf.setText(""); return; // should return back to it's caller } }




Reply With Quote