private void setSequence( URL midiSource )
    {
        if( sequencer == null )
        {
            errorMessage( "Unable to update the sequence in method " +
                          "'setSequence', because variable 'sequencer' " +
                          "is null" );
            return;
        }

        if( midiSource == null )
        {
            errorMessage( "Unable to load Midi file in method 'setSequence'." );
            return;
        }

        try
        {
            sequence = MidiSystem.getSequence( midiSource );
        }
        catch( IOException ioe )
        {
            errorMessage( "Input failed while reading from MIDI file in " +
                          "method 'setSequence'." );
            printStackTrace( ioe );
            return;
        }
        catch( InvalidMidiDataException imde )
        {
            errorMessage( "Invalid MIDI data encountered, or not a MIDI " +
                          "file in method 'setSequence' (1)." );
            printStackTrace( imde );
            return;
        }
        if( sequence == null )
        {
            errorMessage( "MidiSystem 'getSequence' method returned null " +
                          "in method 'setSequence'." );
        }
        else
        {
            try
            {
                sequencer.setSequence( sequence );
            }
            catch( InvalidMidiDataException imde )
            {
                errorMessage( "Invalid MIDI data encountered, or not a MIDI " +
                              "file in method 'setSequence' (2)." );
                printStackTrace( imde );
                return;
            }
            catch( Exception e )
            {
                errorMessage( "Problem setting sequence from MIDI file in " +
                              "method 'setSequence'." );
                printStackTrace( e );
                return;
            }
        }
    }