comparePanel

modified compare function, throw exception, improve line seperation.
However the rowIndex are referred to the index of sentences.

Use the same array to ensure we get the same text

String rowOfText1, rowOfText2;
String text1String = "";
String text2String = "";
String[] text1;
String[] text2;

inversionList = new ArrayList<ArrayList<Integer>>();

//input text
Scanner scanner1 = new Scanner(firstText);
Scanner scanner2 = new Scanner(secondText);

//try input two text to array
while(scanner1.hasNext()) {
rowOfText1 = scanner1.nextLine();
text1String = text1String.concat(rowOfText1);
}

while(scanner2.hasNext()) {
rowOfText2 = scanner2.nextLine();
text2String = text2String.concat(rowOfText2);
}

text1 = text1String.split("[,.?;]");
text2 = text2String.split("[,.?;]");

scanner1.close();
scanner2.close();