private int maxPage;
private JPanel tagBars;
+ private List<JComboBox> combos;
private JComboBox comboSupportTypes;
private JTabbedPane searchTabs;
}
private JPanel createByTagSearchPanel() {
+ combos = new ArrayList<JComboBox>();
+
JPanel byTag = new JPanel();
tagBars = new JPanel();
tagBars.setLayout(new BoxLayout(tagBars, BoxLayout.Y_AXIS));
final SearchableTag selected) {
tags.add(0, null);
+ final int comboIndex = combos.size();
+
final JComboBox combo = new JComboBox(
tags.toArray(new SearchableTag[] {}));
combo.setSelectedItem(selected);
final SearchableTag tag = (SearchableTag) combo
.getSelectedItem();
if (tag != null) {
+ while (comboIndex + 1 < combos.size()) {
+ JComboBox combo = combos.remove(comboIndex + 1);
+ tagBars.remove(combo);
+ }
+
addTagBar(tag, new Runnable() {
@Override
public void run() {