return p;
return legendPanel;
    private JPanel buildLegendPanel()    {        JPanel p = new JPanel();        p.setLayout(new GridBagLayout());        GridBagConstraints c = new GridBagConstraints();                // griddy constraints        c.anchor = GridBagConstraints.NORTHWEST;        c.fill = GridBagConstraints.NONE;                // one        c.insets = new Insets(1, 1, 1, 1);        Colors colors = Colors.getInstance();        p.add(buildLegend(colors.getColor(Colors.TITLE_BAR_HIGHLIGHT),                         "Currently selected"), c);                // two        c.gridx = 1;        c.gridy = 0;        p.add(buildLegend(colors.getColor(Colors.REGEX_ANNOTATION),                        "Found in annotation"), c);                // three        c.gridx = 0;        c.gridy = 1;        p.add(buildLegend(colors.getColor(Colors.REGEX_TITLE),                         "Found in title"), c);                   // four        c.gridx = 1;        c.gridy = 1;        p.add(buildLegend(colors.getColor(Colors.REGEX_TITLE_AND_ANNOTATION),                        "Found in either"), c);        //five        c.gridx = 0;        c.gridy = 2;        p.add(buildLegend(colors.getColor(Colors.ANNOTATED),                        "Found in annotated"), c);        return p;    }