FBFileChooser jfc= new FBFileChooser(); jfc.setFileSelectionMode(JFileChooser.FILES_ONLY); jfc.setFileFilter(new FindBugsAnalysisFileFilter());    boolean importing = true; while(importing){ int returnValue=jfc.showOpenDialog(new JFrame());  if (returnValue==JFileChooser.APPROVE_OPTION) { File file=jfc.getSelectedFile();  if(!file.exists()){ JOptionPane.showMessageDialog(jfc, "That file does not exist"); importing = true; continue; } else importing = false;  setCursor(new Cursor(Cursor.WAIT_CURSOR));   final File extraFinalReferenceToXmlFile=file; new Thread(new Runnable(){ public void run() { BugTreeModel model=(BugTreeModel)tree.getModel();  MainFrame.this.setRebuilding(true); BugSet bs=BugLoader.loadBugs(extraFinalReferenceToXmlFile); MainFrame.this.setRebuilding(false); if (bs!=null) { ProjectSettings.newInstance(); model.getOffListenerList(); updateDesignation(); model.changeSet(bs); curProject=BugLoader.getLoadedProject(); MainFrame.this.updateStatusBar(); } } }).start();  setCursor(new Cursor(Cursor.DEFAULT_CURSOR));  setProjectChanged(false); } else return;  }
PreferencesFrame.getInstance().setVisible(true);
			public void actionPerformed(ActionEvent evt){				saveCommentsToBug(currentSelectedBugLeaf);								FBFileChooser jfc= new FBFileChooser();				jfc.setFileSelectionMode(JFileChooser.FILES_ONLY);				jfc.setFileFilter(new FindBugsAnalysisFileFilter());								// jfc.setCurrentDirectory(GUISaveState.getInstance().getStarterDirectoryForLoadBugs()); this is done by FBFileChooser now.												boolean importing = true;				while(importing){					int returnValue=jfc.showOpenDialog(new JFrame());										if (returnValue==JFileChooser.APPROVE_OPTION)					{						File file=jfc.getSelectedFile();												if(!file.exists()){							JOptionPane.showMessageDialog(jfc, "That file does not exist");							importing = true;							continue;						}						else							importing = false;												setCursor(new Cursor(Cursor.WAIT_CURSOR));												final File extraFinalReferenceToXmlFile=file;						new Thread(new Runnable(){							public void run()							{								BugTreeModel model=(BugTreeModel)tree.getModel();//								BugTreeModel.pleaseWait();								MainFrame.this.setRebuilding(true);								BugSet bs=BugLoader.loadBugs(extraFinalReferenceToXmlFile);								MainFrame.this.setRebuilding(false);								if (bs!=null)								{									ProjectSettings.newInstance();									model.getOffListenerList();									updateDesignation();									model.changeSet(bs);									curProject=BugLoader.getLoadedProject();									MainFrame.this.updateStatusBar();								}							}						}).start();						setCursor(new Cursor(Cursor.DEFAULT_CURSOR));												setProjectChanged(false);					}					else						return;//					GUISaveState.getInstance().setStarterDirectoryForLoadBugs(jfc.getCurrentDirectory()); This is done by FBFileChooser				}			}