Fixed TextField
This commit is contained in:
parent
c10ecfeb15
commit
11529aaf18
@ -77,9 +77,9 @@ public class Listener implements ActionListener, KeyListener, MouseWheelListener
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void keyPressed(KeyEvent ke) {
|
public void keyPressed(KeyEvent ke) {
|
||||||
|
|
||||||
if(ke.getKeyCode() == KeyEvent.VK_ENTER) {
|
|
||||||
byte i = (byte) ((type.equals("Axiome")) ? 0 : 1);
|
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();
|
String text = tab.getTextField(i).getText();
|
||||||
text = ((text.charAt(text.length()-1)==';') ? "\n"+text : "\n"+text+";");
|
text = ((text.charAt(text.length()-1)==';') ? "\n"+text : "\n"+text+";");
|
||||||
tab.getTextField(i).setText(null);
|
tab.getTextField(i).setText(null);
|
||||||
|
Loading…
Reference in New Issue
Block a user