addButton = new JButton(edu.umd.cs.findbugs.gui.L10N.getLocalString("dlg.add_dot_btn", "Add...")); removeButton = new JButton(edu.umd.cs.findbugs.gui.L10N.getLocalString("dlg.remove_btn", "Remove")); removeAllButton = new JButton(edu.umd.cs.findbugs.gui.L10N.getLocalString("dlg.remove_all_btn", "Remove All"));
addButton = new JButton(edu.umd.cs.findbugs.L10N.getLocalString("dlg.add_dot_btn", "Add...")); removeButton = new JButton(edu.umd.cs.findbugs.L10N.getLocalString("dlg.remove_btn", "Remove")); removeAllButton = new JButton(edu.umd.cs.findbugs.L10N.getLocalString("dlg.remove_all_btn", "Remove All"));
	private JPanel createFilterPane()	{		addButton = new JButton(edu.umd.cs.findbugs.gui.L10N.getLocalString("dlg.add_dot_btn", "Add..."));		removeButton = new JButton(edu.umd.cs.findbugs.gui.L10N.getLocalString("dlg.remove_btn", "Remove"));		removeAllButton = new JButton(edu.umd.cs.findbugs.gui.L10N.getLocalString("dlg.remove_all_btn", "Remove All"));		JPanel filterPanel = new JPanel();		filterPanel.setLayout(new GridBagLayout());		GridBagConstraints gbc = new GridBagConstraints();				gbc.gridheight = 4;		gbc.gridwidth = 1;		gbc.gridx = 0;		gbc.gridy = 0;		gbc.fill = GridBagConstraints.BOTH;		gbc.weightx = 1;		gbc.weighty = 1;		//filterPanel.add(new JScrollPane(new CheckBoxList(new JCheckBox[]{ new JCheckBox("Dummy Filter #1 with an extremely long name that should necessitate the use of a scroll bar"), new JCheckBox("Dummy Filter #2") })), gbc);		filterPanel.add(new JScrollPane(filterCheckBoxList), gbc);		updateFilterPanel();				gbc.gridheight = 1;		gbc.gridx = 1;		gbc.gridy = 0;		gbc.fill = GridBagConstraints.HORIZONTAL;		gbc.weightx = 0;		gbc.weighty = 0;		filterPanel.add(addButton, gbc);		addButton.addActionListener(new ActionListener()		{			public void actionPerformed(ActionEvent evt)			{				NewFilterFrame.open();			}		});				gbc.gridy = 1;		gbc.insets = new Insets(5, 0, 0, 0);		filterPanel.add(removeButton, gbc);		removeButton.addActionListener(new ActionListener()		{			public void actionPerformed(ActionEvent evt)			{				int[] selected = filterCheckBoxList.getSelectedIndices();				if (selected.length == 0)					return;				if (selected.length == 1){					ProjectSettings.getInstance().removeFilter(ProjectSettings.getInstance().getAllFilters().get(selected[0]));					MainFrame.getInstance().setProjectChanged(true);				}				else{					for (int i : selected)						ProjectSettings.getInstance().removeFilter(ProjectSettings.getInstance().getAllFilters().get(i));					MainFrame.getInstance().setProjectChanged(true);				}				updateFilterPanel();							}		});		gbc.gridy = 2;		gbc.weighty = 0;		gbc.insets = new Insets(5, 0, 0, 0);		filterPanel.add(removeAllButton, gbc);		removeAllButton.addActionListener(new ActionListener()				{					public void actionPerformed(ActionEvent evt)					{						ArrayList<FilterMatcher> theList = ProjectSettings.getInstance().getAllFilters();						int len = theList.size();						if(len > 0)						{							for (int j=len-1; j>=0; j--) // we have to go backwards because removing the first item changes the indices of all the rest								ProjectSettings.getInstance().removeFilter(ProjectSettings.getInstance().getAllFilters().get(j));							MainFrame.getInstance().setProjectChanged(true);						}						updateFilterPanel();											}				});				gbc.gridy = 3;		gbc.weighty = 1;		gbc.insets = new Insets(0, 0, 0, 0);		filterPanel.add(Box.createGlue(), gbc);				return filterPanel;	}