Browse Source

Commit_8 Gui Erweiterung-- addActionListener

Eduard2
Adah Boukhari 5 years ago
parent
commit
e0243ceed2
  1. BIN
      Budget Projekt/bin/MeinBudgetView/MeinGui$1.class
  2. BIN
      Budget Projekt/bin/MeinBudgetView/MeinGui.class
  3. 14
      Budget Projekt/src/MeinBudgetView/MeinGui.java

BIN
Budget Projekt/bin/MeinBudgetView/MeinGui$1.class

BIN
Budget Projekt/bin/MeinBudgetView/MeinGui.class

14
Budget Projekt/src/MeinBudgetView/MeinGui.java

@ -32,6 +32,7 @@ public class MeinGui extends JFrame implements ActionListener {
JLabel leeren; JLabel leeren;
JButton loeschen; JButton loeschen;
JButton exit; JButton exit;
private JLabel budgetDispaly;
/** /**
* Launch the application. * Launch the application.
*/ */
@ -148,16 +149,16 @@ public class MeinGui extends JFrame implements ActionListener {
beendne.setBounds(508, 246, 81, 14); beendne.setBounds(508, 246, 81, 14);
contentPane.add(beendne); contentPane.add(beendne);
this.budgetDispaly = new JLabel("0.0");
this.budgetDispaly.setBounds(352, 115, 46, 14);
contentPane.add(this.budgetDispaly);
this.text1.addActionListener(this); this.text1.addActionListener(this);
this.text2.addActionListener(this); this.text2.addActionListener(this);
this.senden.addActionListener(this); this.senden.addActionListener(this);
this.berechne.addActionListener(this); this.berechne.addActionListener(this);
this.loeschen.addActionListener(this); this.loeschen.addActionListener(this);
this.exit.addActionListener(this); this.exit.addActionListener(this);
} }
@ -167,6 +168,11 @@ public class MeinGui extends JFrame implements ActionListener {
if (ae.getSource() == this.exit) { if (ae.getSource() == this.exit) {
System.exit(0); System.exit(0);
} }
if (ae.getSource() == this.senden && (this.text1 != null && this.text2 != null)) {
//this.text2.setText(this.text1.getText() + " ");
this.budgetDispaly.setText(this.text1.getText() + " €");
}
} }
} }
Loading…
Cancel
Save