Object f = filelist.getSelectedValue();
JList list = (JList) e.getSource(); Object f = list.getSelectedValue();
    public void valueChanged(ListSelectionEvent e)    {      Object f = filelist.getSelectedValue();      if (f == null)	return;      File file = filechooser.getFileSystemView().createFileObject(f.toString());      if (! filechooser.isTraversable(file))	filechooser.setSelectedFile(file);      else	filechooser.setSelectedFile(null);    }