Browse Source

Test Commit

Eduard2
eduardD 5 years ago
parent
commit
c5d7d99816
  1. 1
      .gitignore
  2. 2
      Budget Projekt/.classpath
  3. 6
      Budget Projekt/.settings/org.eclipse.jdt.core.prefs
  4. 1
      Budget Projekt/bin/.gitignore
  5. BIN
      Budget Projekt/bin/MeinBudgetView/MeinGui$1.class
  6. BIN
      Budget Projekt/bin/MeinBudgetView/MeinGui$2.class
  7. BIN
      Budget Projekt/bin/MeinBudgetView/MeinGui.class
  8. BIN
      Budget Projekt/bin/MeinBudgetView/MyTest.class
  9. 25
      Budget Projekt/src/MeinBudgetView/MeinGui.java

1
.gitignore

@ -0,0 +1 @@
/.metadata/

2
Budget Projekt/.classpath

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-10">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="module" value="true"/>
</attributes>

6
Budget Projekt/.settings/org.eclipse.jdt.core.prefs

@ -1,12 +1,12 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=10
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=10
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=10
org.eclipse.jdt.core.compiler.source=1.8

1
Budget Projekt/bin/.gitignore

@ -0,0 +1 @@
/MeinBudgetView/

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

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

BIN
Budget Projekt/bin/MeinBudgetView/MeinGui.class

BIN
Budget Projekt/bin/MeinBudgetView/MyTest.class

25
Budget Projekt/src/MeinBudgetView/MeinGui.java

@ -20,6 +20,14 @@ import javax.swing.JComboBox;
import javax.swing.JTextArea;
import java.awt.Color;
import javax.swing.JSeparator;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import javax.swing.border.EtchedBorder;
import javax.swing.border.MatteBorder;
import javax.swing.border.BevelBorder;
import javax.swing.border.TitledBorder;
import javax.swing.UIManager;
public class MeinGui extends JFrame implements ActionListener {
@ -31,7 +39,7 @@ public class MeinGui extends JFrame implements ActionListener {
JLabel labelBalancetImage;
JLabel labelHauptImage;
JButton senden;
JButton berechne;
JButton hinzufügen;
JLabel leeren;
JButton loeschen;
JButton exit;
@ -68,10 +76,10 @@ public class MeinGui extends JFrame implements ActionListener {
setContentPane(contentPane);
contentPane.setLayout(null);
this.berechne = new JButton("Berechne");
berechne.setToolTipText("");
berechne.setBounds(78, 281, 110, 23);
contentPane.add(berechne);
this.hinzufügen = new JButton("Hinzufügen");
hinzufügen.setToolTipText("");
hinzufügen.setBounds(78, 281, 110, 23);
contentPane.add(hinzufügen);
this.senden = new JButton("Senden");
senden.setBounds(78, 126, 110, 23);
@ -180,7 +188,7 @@ public class MeinGui extends JFrame implements ActionListener {
text1.addActionListener(this);
text2.addActionListener(this);
senden.addActionListener(this);
berechne.addActionListener(this);
hinzufügen.addActionListener(this);
loeschen.addActionListener(this);
exit.addActionListener(this);
@ -201,8 +209,9 @@ public class MeinGui extends JFrame implements ActionListener {
budgetDispaly.setText(setBudgetView());
}
if (ae.getSource() == this.berechne && (text1 != null && text2 != null)) {
Calculations.setExpense(Calculations.getBudget() - Integer.parseInt(text2.getText()));
if (ae.getSource() == this.hinzufügen && (text1 != null && text2 != null)) {
int temp = Integer.parseInt(text2.getText());
Calculations.setExpense(Calculations.getBudget() - temp);
expensesDisplay.setText(setExpensesView());
Calculations.setBalance(Integer.parseInt(text1.getText()) - Integer.parseInt(text2.getText())) ;
balanceDisplay.setText(setBalanceView());

Loading…
Cancel
Save