private void highlightAll(String searchString) {
                    ChannelPanel channel = (ChannelPanel) tabbedPane.getSelectedComponent();
                    StyledDocument doc = channel.chatPane.getStyledDocument();
                    DefaultHighlighter.DefaultHighlightPainter p = new DefaultHighlighter.DefaultHighlightPainter(highlightColor);
                    DefaultHighlighter highlighter = (DefaultHighlighter) channel.chatPane.getHighlighter();
                    String s = "";
                    try {
                        s = doc.getText(0, doc.getLength());
                    } catch (BadLocationException ex) {
                        Logger.getLogger(GUI.class.getName()).log(Level.SEVERE, null, ex);
                    }

                    removeHighlights();

                    int location = 0;

                    while (location != -1) {
                        if (matchCase.isSelected()) {
                            if (channel.lastSearchIndex == -1) location = s.indexOf(searchString);
                            else location = s.indexOf(searchString, channel.lastSearchIndex + searchString.length());
                        } else {
                            if (channel.lastSearchIndex == -1)
                                location = StringUtils.indexOfIgnoreCase(s, searchString);
                            else
                                location = StringUtils.indexOfIgnoreCase(s, searchString, channel.lastSearchIndex + searchString.length());
                        }
                        channel.lastSearchIndex = location;
                        if (location == -1) break;
                        try {
                            highlighter.addHighlight(location, location + searchString.length(), p);
                        } catch (BadLocationException ex) {
                            Logger.getLogger(GUI.class.getName()).log(Level.SEVERE, null, ex);
                        }
                    }
                }