Furchenfratze
Ensign
- Registriert
- Apr. 2006
- Beiträge
- 134
Hallo, ich habe für den Taschenrechner den Parser von der Website http://www.singularsys.com/jep/download-trial.php und habe dort den untersten also den GLP verwendet. Programmiert wurde der Taschenrechner mit NetBeans. Das Problem was ich nun habe ist das der Parser immer im Modus rad rechnet. Da ich jedoch den Modus deg möchte muss ich am besten einen button einbauen mit dem dieses umschalten möglich ist. Mein Problem besteht nun in dem Befehl, welcher für einen solchen Button benötig wird, bzw. für beide um ihn auch wieder von deg auf rad zurück zu stellen. Mein bisheriger Quellcode sieht wie folgt aus:
* @author Fabian
*/
import org.nfunk.jep.*;
import org.nfunk.jep.type.Complex;
public class Rechner extends javax.swing.JFrame {
org.nfunk.jep.JEP Parser = new org.nfunk.jep.JEP ();
//Variables
double firstDouble;
double secondDouble;
Complex totalDouble;
//to check for button clicks
int plusClick;
int minusClick;
int multiplyClick;
int divideClick;
int decimalClick =1;
String Formel;
/**
* Creates new form Rechner
*/
public Rechner() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
jPanel2 = new javax.swing.JPanel();
jPanel1 = new javax.swing.JPanel();
display = new javax.swing.JTextField();
jButton10 = new javax.swing.JButton();
decimal = new javax.swing.JButton();
equals = new javax.swing.JButton();
minus = new javax.swing.JButton();
multiply = new javax.swing.JButton();
divide = new javax.swing.JButton();
jButton3 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jButton1 = new javax.swing.JButton();
plus = new javax.swing.JButton();
jButton4 = new javax.swing.JButton();
jButton5 = new javax.swing.JButton();
jButton6 = new javax.swing.JButton();
jButton7 = new javax.swing.JButton();
jButton8 = new javax.swing.JButton();
jButton9 = new javax.swing.JButton();
clear = new javax.swing.JButton();
Start = new javax.swing.JButton();
Eingabe = new javax.swing.JLabel();
jLabel1 = new javax.swing.JLabel();
Ausgabe = new javax.swing.JTextField();
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 100, Short.MAX_VALUE)
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 100, Short.MAX_VALUE)
);
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Fabians Taschenrechner");
setBackground(new java.awt.Color(16, 11, 4));
jPanel1.setBackground(java.awt.Color.green);
jPanel1.setBorder(new javax.swing.border.MatteBorder(null));
jPanel1.setFont(new java.awt.Font("Comic Sans MS", 1, 14)); // NOI18N
display.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
display.setText("zum starten \"Start\" drücken ");
display.setBorder(javax.swing.BorderFactory.createEtchedBorder());
display.setPreferredSize(new java.awt.Dimension(90, 50));
jButton10.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
jButton10.setText("0");
jButton10.setInheritsPopupMenu(true);
jButton10.setPreferredSize(new java.awt.Dimension(100, 50));
jButton10.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton10ActionPerformed(evt);
}
});
decimal.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
decimal.setText(".");
decimal.setPreferredSize(new java.awt.Dimension(50, 50));
decimal.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
decimalActionPerformed(evt);
}
});
equals.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
equals.setText("=");
equals.setPreferredSize(new java.awt.Dimension(50, 100));
equals.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
equalsActionPerformed(evt);
}
});
minus.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
minus.setText("-");
minus.setPreferredSize(new java.awt.Dimension(50, 50));
minus.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
minusActionPerformed(evt);
}
});
multiply.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
multiply.setText("*");
multiply.setPreferredSize(new java.awt.Dimension(50, 50));
multiply.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
multiplyActionPerformed(evt);
}
});
divide.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
divide.setText("/");
divide.setPreferredSize(new java.awt.Dimension(50, 50));
divide.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
divideActionPerformed(evt);
}
});
jButton3.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
jButton3.setText("3");
jButton3.setPreferredSize(new java.awt.Dimension(50, 50));
jButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton3ActionPerformed(evt);
}
});
jButton2.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
jButton2.setText("2");
jButton2.setPreferredSize(new java.awt.Dimension(50, 50));
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
jButton1.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
jButton1.setText("1");
jButton1.setPreferredSize(new java.awt.Dimension(50, 50));
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
plus.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
plus.setText("+");
plus.setPreferredSize(new java.awt.Dimension(50, 50));
plus.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
plusActionPerformed(evt);
}
});
jButton4.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
jButton4.setText("4");
jButton4.setPreferredSize(new java.awt.Dimension(50, 50));
jButton4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton4ActionPerformed(evt);
}
});
jButton5.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
jButton5.setText("5");
jButton5.setPreferredSize(new java.awt.Dimension(50, 50));
jButton5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton5ActionPerformed(evt);
}
});
jButton6.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
jButton6.setText("6");
jButton6.setPreferredSize(new java.awt.Dimension(50, 50));
jButton6.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton6ActionPerformed(evt);
}
});
jButton7.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
jButton7.setText("7");
jButton7.setPreferredSize(new java.awt.Dimension(50, 50));
jButton7.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton7ActionPerformed(evt);
}
});
jButton8.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
jButton8.setText("8");
jButton8.setPreferredSize(new java.awt.Dimension(50, 50));
jButton8.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton8ActionPerformed(evt);
}
});
jButton9.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
jButton9.setText("9");
jButton9.setPreferredSize(new java.awt.Dimension(50, 50));
jButton9.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton9ActionPerformed(evt);
}
});
clear.setBackground(new java.awt.Color(233, 2, 2));
clear.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
clear.setForeground(new java.awt.Color(46, 31, 234));
clear.setText("C");
clear.setPreferredSize(new java.awt.Dimension(50, 50));
clear.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
clearActionPerformed(evt);
}
});
Start.setText("Start");
Start.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
StartActionPerformed(evt);
}
});
Eingabe.setText("Eingabe");
jLabel1.setText("Ausgabe");
Ausgabe.setEditable(false);
private void jButton1ActionPerformed(java.awt.event.ActionEvent
evt) {
display.setText(display.getText()+"1");
}
private void clearActionPerformed(java.awt.event.ActionEvent evt) {
display.setText("");
decimalClick=1;
}
private void jButton2ActionPerformed(java.awt.event.ActionEvent
evt) {
display.setText(display.getText()+"2");
}
private void jButton3ActionPerformed(java.awt.event.ActionEvent
evt) {
display.setText(display.getText()+"3");
}
private void jButton4ActionPerformed(java.awt.event.ActionEvent
evt) {
display.setText(display.getText()+"4");
}
private void jButton5ActionPerformed(java.awt.event.ActionEvent
evt) {
display.setText(display.getText()+"5");
}
private void jButton6ActionPerformed(java.awt.event.ActionEvent
evt) {
display.setText(display.getText()+"6");
}
private void jButton7ActionPerformed(java.awt.event.ActionEvent
evt) {
display.setText(display.getText()+"7");
}
private void jButton9ActionPerformed(java.awt.event.ActionEvent
evt) {
display.setText(display.getText()+"9");
}
private void jButton8ActionPerformed(java.awt.event.ActionEvent
evt) {
display.setText(display.getText()+"8");
}
private void jButton10ActionPerformed(java.awt.event.ActionEvent
evt) {
display.setText(display.getText()+"0");
}
private void decimalActionPerformed(java.awt.event.ActionEvent evt) {
if(decimalClick==1)
{display.setText(display.getText()+".");
decimalClick=0;
}
}
private void divideActionPerformed(java.awt.event.ActionEvent evt) {
display.setText(display.getText()+"/");
decimalClick=1;
}
private void multiplyActionPerformed(java.awt.event.ActionEvent
evt) {
display.setText(display.getText()+"*");
decimalClick=1;
}
private void minusActionPerformed(java.awt.event.ActionEvent evt) {
display.setText(display.getText()+"-");
decimalClick=1;
}
private void plusActionPerformed(java.awt.event.ActionEvent evt) {
display.setText(display.getText()+"+");
decimalClick=1;
}
private void equalsActionPerformed(java.awt.event.ActionEvent evt) {
Formel=(display.getText());
Parser.parseExpression(Formel);
totalDouble = Parser.getComplexValue();
display.setText(""+totalDouble);
}
private void StartActionPerformed(java.awt.event.ActionEvent evt) {
Parser.addComplex();
Parser.setImplicitMul(true);
Parser.setAllowUndeclared(true);
Parser.addStandardFunctions();
Parser.addStandardConstants();
display.setText("");
}
* @author Fabian
*/
import org.nfunk.jep.*;
import org.nfunk.jep.type.Complex;
public class Rechner extends javax.swing.JFrame {
org.nfunk.jep.JEP Parser = new org.nfunk.jep.JEP ();
//Variables
double firstDouble;
double secondDouble;
Complex totalDouble;
//to check for button clicks
int plusClick;
int minusClick;
int multiplyClick;
int divideClick;
int decimalClick =1;
String Formel;
/**
* Creates new form Rechner
*/
public Rechner() {
initComponents();
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
jPanel2 = new javax.swing.JPanel();
jPanel1 = new javax.swing.JPanel();
display = new javax.swing.JTextField();
jButton10 = new javax.swing.JButton();
decimal = new javax.swing.JButton();
equals = new javax.swing.JButton();
minus = new javax.swing.JButton();
multiply = new javax.swing.JButton();
divide = new javax.swing.JButton();
jButton3 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jButton1 = new javax.swing.JButton();
plus = new javax.swing.JButton();
jButton4 = new javax.swing.JButton();
jButton5 = new javax.swing.JButton();
jButton6 = new javax.swing.JButton();
jButton7 = new javax.swing.JButton();
jButton8 = new javax.swing.JButton();
jButton9 = new javax.swing.JButton();
clear = new javax.swing.JButton();
Start = new javax.swing.JButton();
Eingabe = new javax.swing.JLabel();
jLabel1 = new javax.swing.JLabel();
Ausgabe = new javax.swing.JTextField();
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 100, Short.MAX_VALUE)
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 100, Short.MAX_VALUE)
);
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Fabians Taschenrechner");
setBackground(new java.awt.Color(16, 11, 4));
jPanel1.setBackground(java.awt.Color.green);
jPanel1.setBorder(new javax.swing.border.MatteBorder(null));
jPanel1.setFont(new java.awt.Font("Comic Sans MS", 1, 14)); // NOI18N
display.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
display.setText("zum starten \"Start\" drücken ");
display.setBorder(javax.swing.BorderFactory.createEtchedBorder());
display.setPreferredSize(new java.awt.Dimension(90, 50));
jButton10.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
jButton10.setText("0");
jButton10.setInheritsPopupMenu(true);
jButton10.setPreferredSize(new java.awt.Dimension(100, 50));
jButton10.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton10ActionPerformed(evt);
}
});
decimal.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
decimal.setText(".");
decimal.setPreferredSize(new java.awt.Dimension(50, 50));
decimal.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
decimalActionPerformed(evt);
}
});
equals.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
equals.setText("=");
equals.setPreferredSize(new java.awt.Dimension(50, 100));
equals.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
equalsActionPerformed(evt);
}
});
minus.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
minus.setText("-");
minus.setPreferredSize(new java.awt.Dimension(50, 50));
minus.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
minusActionPerformed(evt);
}
});
multiply.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
multiply.setText("*");
multiply.setPreferredSize(new java.awt.Dimension(50, 50));
multiply.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
multiplyActionPerformed(evt);
}
});
divide.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
divide.setText("/");
divide.setPreferredSize(new java.awt.Dimension(50, 50));
divide.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
divideActionPerformed(evt);
}
});
jButton3.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
jButton3.setText("3");
jButton3.setPreferredSize(new java.awt.Dimension(50, 50));
jButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton3ActionPerformed(evt);
}
});
jButton2.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
jButton2.setText("2");
jButton2.setPreferredSize(new java.awt.Dimension(50, 50));
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
jButton1.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
jButton1.setText("1");
jButton1.setPreferredSize(new java.awt.Dimension(50, 50));
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
plus.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
plus.setText("+");
plus.setPreferredSize(new java.awt.Dimension(50, 50));
plus.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
plusActionPerformed(evt);
}
});
jButton4.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
jButton4.setText("4");
jButton4.setPreferredSize(new java.awt.Dimension(50, 50));
jButton4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton4ActionPerformed(evt);
}
});
jButton5.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
jButton5.setText("5");
jButton5.setPreferredSize(new java.awt.Dimension(50, 50));
jButton5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton5ActionPerformed(evt);
}
});
jButton6.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
jButton6.setText("6");
jButton6.setPreferredSize(new java.awt.Dimension(50, 50));
jButton6.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton6ActionPerformed(evt);
}
});
jButton7.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
jButton7.setText("7");
jButton7.setPreferredSize(new java.awt.Dimension(50, 50));
jButton7.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton7ActionPerformed(evt);
}
});
jButton8.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
jButton8.setText("8");
jButton8.setPreferredSize(new java.awt.Dimension(50, 50));
jButton8.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton8ActionPerformed(evt);
}
});
jButton9.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
jButton9.setText("9");
jButton9.setPreferredSize(new java.awt.Dimension(50, 50));
jButton9.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton9ActionPerformed(evt);
}
});
clear.setBackground(new java.awt.Color(233, 2, 2));
clear.setFont(new java.awt.Font("Comic Sans MS", 1, 18)); // NOI18N
clear.setForeground(new java.awt.Color(46, 31, 234));
clear.setText("C");
clear.setPreferredSize(new java.awt.Dimension(50, 50));
clear.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
clearActionPerformed(evt);
}
});
Start.setText("Start");
Start.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
StartActionPerformed(evt);
}
});
Eingabe.setText("Eingabe");
jLabel1.setText("Ausgabe");
Ausgabe.setEditable(false);
private void jButton1ActionPerformed(java.awt.event.ActionEvent
evt) {
display.setText(display.getText()+"1");
}
private void clearActionPerformed(java.awt.event.ActionEvent evt) {
display.setText("");
decimalClick=1;
}
private void jButton2ActionPerformed(java.awt.event.ActionEvent
evt) {
display.setText(display.getText()+"2");
}
private void jButton3ActionPerformed(java.awt.event.ActionEvent
evt) {
display.setText(display.getText()+"3");
}
private void jButton4ActionPerformed(java.awt.event.ActionEvent
evt) {
display.setText(display.getText()+"4");
}
private void jButton5ActionPerformed(java.awt.event.ActionEvent
evt) {
display.setText(display.getText()+"5");
}
private void jButton6ActionPerformed(java.awt.event.ActionEvent
evt) {
display.setText(display.getText()+"6");
}
private void jButton7ActionPerformed(java.awt.event.ActionEvent
evt) {
display.setText(display.getText()+"7");
}
private void jButton9ActionPerformed(java.awt.event.ActionEvent
evt) {
display.setText(display.getText()+"9");
}
private void jButton8ActionPerformed(java.awt.event.ActionEvent
evt) {
display.setText(display.getText()+"8");
}
private void jButton10ActionPerformed(java.awt.event.ActionEvent
evt) {
display.setText(display.getText()+"0");
}
private void decimalActionPerformed(java.awt.event.ActionEvent evt) {
if(decimalClick==1)
{display.setText(display.getText()+".");
decimalClick=0;
}
}
private void divideActionPerformed(java.awt.event.ActionEvent evt) {
display.setText(display.getText()+"/");
decimalClick=1;
}
private void multiplyActionPerformed(java.awt.event.ActionEvent
evt) {
display.setText(display.getText()+"*");
decimalClick=1;
}
private void minusActionPerformed(java.awt.event.ActionEvent evt) {
display.setText(display.getText()+"-");
decimalClick=1;
}
private void plusActionPerformed(java.awt.event.ActionEvent evt) {
display.setText(display.getText()+"+");
decimalClick=1;
}
private void equalsActionPerformed(java.awt.event.ActionEvent evt) {
Formel=(display.getText());
Parser.parseExpression(Formel);
totalDouble = Parser.getComplexValue();
display.setText(""+totalDouble);
}
private void StartActionPerformed(java.awt.event.ActionEvent evt) {
Parser.addComplex();
Parser.setImplicitMul(true);
Parser.setAllowUndeclared(true);
Parser.addStandardFunctions();
Parser.addStandardConstants();
display.setText("");
}