public void setNextMessage() {
        try{
            clearMessageBoard();
            message1 = message[currentMessageIndex].substring(0,message[currentMessageIndex].length() > 40 ? 40 : message[currentMessageIndex].length());
            message2 = message[currentMessageIndex].length() > 40?message[currentMessageIndex].substring(40,message[currentMessageIndex].length()) : "";
        }catch(ArrayIndexOutOfBoundsException e){
            setVisible(false);
        }
        currentMessageIndex++;

    }