public void refresh()
    {
        try
        {
            int i = mySlider.getValue();
            if(i > myMax)
                i = myMax;
            if(mySlider.getValue() < myMin)
                mySlider.setValue(myMin);
            myDisplay.setText(myText.substring(myMin, i));
            myLengthDisplay.setText("" + (mySlider.getValue() - myMin));
//            myPane.stages[4].setVisible(false);
//            myPane.stages[5].setVisible(false);
//            myPane.updateLeftPanel();
            
//            getRootPane().repaint();
            repaint();
        }
        catch(StringIndexOutOfBoundsException e)
        {
            /*
             * Refresh is triggered whenever the slider is moved or the 
             * range is reset. This can cause multiple exceptions when
             * we are merely adjusting the max of the slider. Thus, the
             * exception is ignored. 
             */
        }
//        getRootPane().repaint();
    }