diff --git a/Budget Projekt/bin/MeinBudgetView/MeinGui.class b/Budget Projekt/bin/MeinBudgetView/MeinGui.class index 5594c82..f6f65bc 100644 Binary files a/Budget Projekt/bin/MeinBudgetView/MeinGui.class and b/Budget Projekt/bin/MeinBudgetView/MeinGui.class differ diff --git a/Budget Projekt/src/MeinBudgetView/MeinGui.java b/Budget Projekt/src/MeinBudgetView/MeinGui.java index 8b2304b..127f04b 100644 --- a/Budget Projekt/src/MeinBudgetView/MeinGui.java +++ b/Budget Projekt/src/MeinBudgetView/MeinGui.java @@ -257,12 +257,12 @@ public class MeinGui extends JFrame implements ActionListener, KeyListener { } public static void leeren() { - text1.setText(null); - text2.setText(null); - budgetDispaly.setText(null); - expensesDisplay.setText(null); - balanceDisplay.setText(null); - textExpensesName.setText(null); + text1.setText(""); + text2.setText(""); + budgetDispaly.setText("0.0 €"); + expensesDisplay.setText("0.0 €"); + balanceDisplay.setText("0.0 €"); + textExpensesName.setText(""); ((DefaultTableModel) myTable.getModel()).setRowCount(0); } @@ -283,26 +283,21 @@ public class MeinGui extends JFrame implements ActionListener, KeyListener { @Override public void keyTyped(KeyEvent e) { - // TODO Auto-generated method stub + } @Override public void keyPressed(KeyEvent e) { - - if (e.getKeyCode() == KeyEvent.VK_ENTER) { - if (text1.getText().length() > 0) { - budgetDispaly.setText(setBudgetView()); - } else { - JOptionPane.showMessageDialog(text1, "Füllen Sie alle Felder aus!"); - } + if (e.getKeyCode() == KeyEvent.VK_L) { + leeren(); } } @Override public void keyReleased(KeyEvent e) { // TODO Auto-generated method stub - + } } diff --git a/Command.txt b/Command.txt new file mode 100644 index 0000000..f5253bd --- /dev/null +++ b/Command.txt @@ -0,0 +1,3 @@ +Befehle: + +L: Alle Einträge leeren