currentDirectory = chooser.getSelectedFile().getParentFile();
    private void browseJarButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseJarButtonActionPerformed        JFileChooser chooser = new JFileChooser();        FileFilter filter = new FileFilter() {            public boolean accept(File file) { return file.isDirectory() || file.getName().endsWith(".jar"); }            public String getDescription() { return "Jar files (*.jar)"; }        };        chooser.setFileFilter(filter);        int rc = chooser.showDialog(this, "Add Jar file");        if (rc == JFileChooser.APPROVE_OPTION) {            jarNameTextField.setText(chooser.getSelectedFile().getPath());            addJarToList();        }    }//GEN-LAST:event_browseJarButtonActionPerformed