description.setText("<html><body><p>Click on a bug to view a detailed description.</p><p>Double-click to be " + "taken to its location in the source code.</p>" + (allCompiled ? "" : "<p>* Classes marked with an " + "asterisk were not compiled when Findbugs ran, so this list may not reflect recent changes in the " + "source code.</p>"));
try { description.setPage(ResultsFrame.class.getResource("about.html")); } catch (IOException e) { description.setText("<html><body><p>XXXX Click on a bug to view a detailed description.</p><p>Double-click to be " + "taken to its location in the source code.</p>" + (allCompiled ? "" : "<p>* Classes marked with an " + "asterisk were not compiled when Findbugs ran, so this list may not reflect recent changes in the " + "source code.</p>" + "<p>Bug: " + e.toString())); }
	public void update(final SortedBugCollection bugs, BProject project)	{		try		{			setTitle("FindBugs results [" + project.getName() + "]");		}		catch (ProjectNotOpenException e)		{			setTitle("FindBugs results");		}		try		{			setIconImage(ImageIO.read(ResultsFrame.class.getResource("/smallBuggy.png")));		}		catch (IOException e)		{			Log.recordBug(e);		}				currProject = project;		final ArrayList<BugInstance> bugList = new ArrayList<BugInstance>(bugs				.getCollection());		final JTable table = new JTable(new MyTableModel(bugList));		for (int i = 0; i < columnNames.length; i++)			table.getColumn(columnNames[i]).setPreferredWidth(columnWidths[i]);		table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);		table.addMouseListener(new MouseAdapter()		{			@Override			public void mouseClicked(MouseEvent evt)			{				if (evt.getClickCount() == 2)					showEditorAndHighlight(bugList.get(table.getSelectedRow()));				else				{					description.setText(bugList.get(table.getSelectedRow()).getBugPattern().getDetailHTML());					SwingUtilities.invokeLater(new Runnable()					{						public void run()						{							bottomScroll.getVerticalScrollBar().setValue(bottomScroll.getVerticalScrollBar().getMinimum());						}					});				}			} 		});		JScrollPane topScroll = new JScrollPane(table);		topScroll.setPreferredSize(new Dimension(675, 200));		description = new JEditorPane();		description.setContentType("text/html");		description.setEditable(false);				boolean allCompiled = true;		for (BugInstance bug : bugs.getCollection())		{			try			{				if (!project.getPackage(bug.getPrimarySourceLineAnnotation().getPackageName()).getBClass(getClassName(bug.getPrimarySourceLineAnnotation())).isCompiled())				{					allCompiled = false;					break;				}			}			catch (ExtensionException e)			{				Log.recordBug(e);				continue;			}		}		description.setText("<html><body><p>Click on a bug to view a detailed description.</p><p>Double-click to be " +			"taken to its location in the source code.</p>" + (allCompiled ? "" : "<p>* Classes marked with an " +			"asterisk were not compiled when Findbugs ran, so this list may not reflect recent changes in the " +			"source code.</p>"));				bottomScroll = new JScrollPane(description);		bottomScroll.setPreferredSize(new Dimension(675, 200));		JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT,				topScroll, bottomScroll);		setContentPane(splitPane);		pack();		setDefaultCloseOperation(HIDE_ON_CLOSE);		setVisible(true);	}