lastSelected = list.getSelectedValue().toString();
lastSelected = path; parentPath = path.substring(0, path.lastIndexOf("/") + 1); entry.setText(path.substring(path.lastIndexOf("/") + 1));
    public void mouseClicked(MouseEvent e)    {      if (list.getSelectedValue() == null)	return;      FileSystemView fsv = filechooser.getFileSystemView();      if (timer.isRunning()          && list.getSelectedValue().toString().equals(lastSelected.toString()))        {	  File f = fsv.createFileObject(lastSelected.toString());	  timer.stop();	  if (filechooser.isTraversable(f))	    {	      filechooser.setCurrentDirectory(f);	      filechooser.rescanCurrentDirectory();	    }	  else	    {	      filechooser.setSelectedFile(f);	      filechooser.approveSelection();	      closeDialog();	    }        }      else        {	  File f = fsv.createFileObject(list.getSelectedValue().toString());	  if (filechooser.isTraversable(f))	    {	      setDirectorySelected(true);	      setDirectory(f);	    }	  else	    {	      setDirectorySelected(false);	      setDirectory(null);	    }	  lastSelected = list.getSelectedValue().toString();	  timer.restart();        }    }