private void searchIndex() {
            
            // if at least one file has been parsed
            if( fileIndex.numOfFilesParsed() != 0 ) {
                
                // show an input dialog box and get the file name from user
                String searchWord = (String) JOptionPane.showInputDialog( new JFrame(), 
                        "Enter word to search for:",
                        "Word to Search for",
                        JOptionPane.OK_OPTION,
                        new ImageIcon( PATH + INDEX_SEARCH_ICON ),
                        null, 
                        "");
                
                // if the user has clicked the cancel button or clicked the ok button without entering in a search term
                if( searchWord == null || searchWord.length() == 0 ) {
                    
                    // show an error dialog box
                    JOptionPane.showMessageDialog( new JFrame(), "Canceled 'Search For' operation." );
                    return;
                }
                
                // get the search results
                String searchResults = fileIndex.searchFor( searchWord, "<br/>" + tab );
                
                // there is at least one search result
                if( searchResults.length() > 0  ) {
                    
                    // output the resutls to the screen
                    mainContentLabel.setText( htmlParagraphPrefix + tab + searchResults + htmlParagraphSuffix );
                }
                else {
                    
                    // let the user no search terms were found
                    JOptionPane.showMessageDialog( new JFrame(), searchWord + " was not found." );
                    mainContentLabel.setText( htmlParagraphPrefix + tab + searchWord + " was not found." + htmlParagraphSuffix );
                }
                    
            }
            // no files have been added to the index so it's not possible to search for words
            else {
                JOptionPane.showMessageDialog( new JFrame(), "ERROR: There are no words to search for because the file index is empty." );
                mainContentLabel.setText( htmlParagraphPrefix + tab + "ERROR: There are no words to search for because the file index is empty." + htmlParagraphSuffix );
            }
        }