Erase get's more precise

This commit is contained in:
Arthur 2021-02-17 15:43:38 +01:00
parent 2139f3d7c3
commit 85491f9f30

View File

@ -61,8 +61,12 @@ public class Listener implements ActionListener, KeyListener {
frame.changeList(String.valueOf(ke.getKeyChar()), (JTextArea) frame.textAreaList.get(index),nbAxioms);
if(ke.getKeyChar() == '\b'){
String str = frame.textAreaList.get(index).getText();
if(str.length()>11) {
str = str.substring(10, str.length() - 1);
frame.textAreaList.get(index).setText(type+" : \n"+str);
System.out.println(str.substring(str.length() - 1, str.length()));
}
else
frame.textAreaList.get(index).setText(type+" : \n");
}
}