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--) ProjectSettings.getInstance().removeFilter(ProjectSettings.getInstance().getAllFilters().get(j)); MainFrame.getInstance().setProjectChanged(true); } updateFilterPanel();  } }); gbc.gridy = 3;
	private JPanel createFilterPane()	{		addButton = new JButton("Add...");		removeButton = new JButton("Remove");		JPanel filterPanel = new JPanel();		filterPanel.setLayout(new GridBagLayout());		GridBagConstraints gbc = new GridBagConstraints();				gbc.gridheight = 3;		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 = 1;		gbc.insets = new Insets(0, 0, 0, 0);		filterPanel.add(Box.createGlue(), gbc);				return filterPanel;	}