Fixed TextField

This commit is contained in:
Arthur 2021-04-19 11:26:15 +02:00
parent c10ecfeb15
commit 11529aaf18

View File

@ -77,9 +77,9 @@ public class Listener implements ActionListener, KeyListener, MouseWheelListener
@Override
public void keyPressed(KeyEvent ke) {
if(ke.getKeyCode() == KeyEvent.VK_ENTER) {
byte i = (byte) ((type.equals("Axiome")) ? 0 : 1);
if(ke.getKeyCode() == KeyEvent.VK_ENTER && tab.getTextField(i).getText().length() > 0){
String text = tab.getTextField(i).getText();
text = ((text.charAt(text.length()-1)==';') ? "\n"+text : "\n"+text+";");
tab.getTextField(i).setText(null);