|
|
@ -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 |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |