if (fileName!=null && fileName.indexOf(java.io.File.separatorChar)<0) fileName = getfileChooser().getCurrentDirectory().toString()+ java.io.File.separatorChar+ fileName;  java.io.File theFile = null; if (fileName==null) { JFileChooser chooser = getfileChooser(); UniversalFileFilter filter = new UniversalFileFilter( new String("dbd"), "DBD File"); chooser.addChoosableFileFilter(filter); chooser.setFileSelectionMode(JFileChooser.FILES_ONLY); int retval = chooser.showOpenDialog(this); if(retval == JFileChooser.APPROVE_OPTION) theFile = chooser.getSelectedFile(); } else theFile = new java.io.File(fileName);  if (theFile==null) return false; else if (!theFile.exists()) { System.out.println("o) Failed to open DBD file - file does not exist: '"+theFile.getAbsolutePath()+"'."); return false; }  GetGUIInterface cmd = (GetGUIInterface)CommandManager.getInstance().getCommand("GetGUIMenuInterface");  try { cmd.getGUIMenuInterface().openDBD(theFile); getStatusMsg1().setText(" "+theFile.getCanonicalFile()+" "); } catch (java.io.IOException e) { Console.getInstance().println("o) Failed to open DBD file: '"+theFile.getAbsolutePath()+"'."); Console.getInstance().println(e); return false; }   return true;
return openDBD(fileName, false);
public boolean openDBD(String fileName) {	if (fileName!=null && fileName.indexOf(java.io.File.separatorChar)<0)		fileName = getfileChooser().getCurrentDirectory().toString()+									java.io.File.separatorChar+									fileName;	java.io.File theFile = null;	if (fileName==null) {		JFileChooser chooser = getfileChooser();		UniversalFileFilter filter = new UniversalFileFilter(			new String("dbd"), "DBD File");		chooser.addChoosableFileFilter(filter);		chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);		int retval = chooser.showOpenDialog(this);		if(retval == JFileChooser.APPROVE_OPTION)		    theFile = chooser.getSelectedFile();	}	else		theFile = new java.io.File(fileName);	if (theFile==null)		return false;			// canceled dialog	else if (!theFile.exists())	{		 System.out.println("o) Failed to open DBD file - file does not exist: '"+theFile.getAbsolutePath()+"'.");		 return false;	}		GetGUIInterface cmd = (GetGUIInterface)CommandManager.getInstance().getCommand("GetGUIMenuInterface");	try {		cmd.getGUIMenuInterface().openDBD(theFile);		getStatusMsg1().setText(" "+theFile.getCanonicalFile()+" ");	} catch (java.io.IOException e) {	    Console.getInstance().println("o) Failed to open DBD file: '"+theFile.getAbsolutePath()+"'.");	    Console.getInstance().println(e);	    return false;	}	return true; 		// !!! add check	}