private File openSourceFile(){
        File javaFile = null;
        JFileChooser openDialog = new JFileChooser();
        FileNameExtensionFilter openFilter = new FileNameExtensionFilter("Java source file *.java","java");
        openDialog.setFileFilter(openFilter);
        int ret = openDialog.showDialog(null, "Open");
        if(ret == JFileChooser.APPROVE_OPTION)
            javaFile = openDialog.getSelectedFile();
        return javaFile;
    }