if(chooser.showOpenDialog(SearchDialog.this) == JFileChooser.APPROVE_OPTION) directory.setText(chooser.getSelectedFile().getPath());
if(chooser.showOpenDialog(SearchDialog.this) == JFileChooser.APPROVE_OPTION) directory.setText(chooser.getSelectedFile().getPath()); } else {   ok(); }
		public void actionPerformed(ActionEvent evt)		{			File dir = new File(directory.getText());			JFileChooser chooser = new JFileChooser(dir.getParent());			chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);			chooser.setSelectedFile(dir);			if(chooser.showOpenDialog(SearchDialog.this)				== JFileChooser.APPROVE_OPTION)				directory.setText(chooser.getSelectedFile().getPath());		}