@Override public void actionPerformed(ActionEvent e) { chooser.setCurrentDirectory(new File("./")); chooser.showOpenDialog(this); if (chooser.getSelectedFile() != null && chooser.getSelectedFile().exists()) { field.setText(chooser.getSelectedFile().toString()); try { parser.buildProject(field.getText()); } catch (FileNotFoundException e1) { e1.printStackTrace(); } catch (ProjectParsingException e1) { e1.printStackTrace(); } } }