|
@ -17,6 +17,7 @@ import java.awt.Font; |
|
|
import javax.swing.JComboBox; |
|
|
import javax.swing.JComboBox; |
|
|
import javax.swing.JTextArea; |
|
|
import javax.swing.JTextArea; |
|
|
import java.awt.Color; |
|
|
import java.awt.Color; |
|
|
|
|
|
import javax.swing.JSeparator; |
|
|
|
|
|
|
|
|
public class MeinGui extends JFrame implements ActionListener { |
|
|
public class MeinGui extends JFrame implements ActionListener { |
|
|
|
|
|
|
|
@ -71,12 +72,12 @@ public class MeinGui extends JFrame implements ActionListener { |
|
|
contentPane.add(senden); |
|
|
contentPane.add(senden); |
|
|
|
|
|
|
|
|
text1 = new JTextField(); |
|
|
text1 = new JTextField(); |
|
|
text1.setBounds(10, 111, 171, 23); |
|
|
|
|
|
|
|
|
text1.setBounds(10, 111, 128, 23); |
|
|
contentPane.add(text1); |
|
|
contentPane.add(text1); |
|
|
text1.setColumns(10); |
|
|
text1.setColumns(10); |
|
|
|
|
|
|
|
|
text2 = new JTextField(); |
|
|
text2 = new JTextField(); |
|
|
text2.setBounds(10, 246, 171, 23); |
|
|
|
|
|
|
|
|
text2.setBounds(10, 246, 128, 23); |
|
|
contentPane.add(text2); |
|
|
contentPane.add(text2); |
|
|
text2.setColumns(10); |
|
|
text2.setColumns(10); |
|
|
|
|
|
|
|
@ -94,36 +95,36 @@ public class MeinGui extends JFrame implements ActionListener { |
|
|
contentPane.add(budgetEingeben); |
|
|
contentPane.add(budgetEingeben); |
|
|
|
|
|
|
|
|
JLabel labelBudget = new JLabel("Budget"); |
|
|
JLabel labelBudget = new JLabel("Budget"); |
|
|
labelBudget.setBounds(352, 39, 46, 14); |
|
|
|
|
|
|
|
|
labelBudget.setBounds(255, 8, 46, 14); |
|
|
contentPane.add(labelBudget); |
|
|
contentPane.add(labelBudget); |
|
|
|
|
|
|
|
|
JLabel labelExpenses = new JLabel("Expenses"); |
|
|
JLabel labelExpenses = new JLabel("Expenses"); |
|
|
labelExpenses.setBounds(440, 39, 56, 14); |
|
|
|
|
|
|
|
|
labelExpenses.setBounds(390, 8, 56, 14); |
|
|
contentPane.add(labelExpenses); |
|
|
contentPane.add(labelExpenses); |
|
|
|
|
|
|
|
|
JLabel labelBalance = new JLabel("Balance"); |
|
|
JLabel labelBalance = new JLabel("Balance"); |
|
|
labelBalance.setBounds(543, 39, 46, 14); |
|
|
|
|
|
|
|
|
labelBalance.setBounds(543, 8, 46, 14); |
|
|
contentPane.add(labelBalance); |
|
|
contentPane.add(labelBalance); |
|
|
|
|
|
|
|
|
labelBudgetImage = new JLabel(""); |
|
|
labelBudgetImage = new JLabel(""); |
|
|
Image image1 = new ImageIcon(this.getClass().getResource("/money.png")).getImage(); |
|
|
Image image1 = new ImageIcon(this.getClass().getResource("/money.png")).getImage(); |
|
|
labelBudgetImage.setIcon(new ImageIcon(image1)); |
|
|
labelBudgetImage.setIcon(new ImageIcon(image1)); |
|
|
|
|
|
|
|
|
labelBudgetImage.setBounds(352, 59, 46, 55); |
|
|
|
|
|
|
|
|
labelBudgetImage.setBounds(255, 22, 46, 55); |
|
|
contentPane.add(labelBudgetImage); |
|
|
contentPane.add(labelBudgetImage); |
|
|
|
|
|
|
|
|
labelExpensesImage = new JLabel(""); |
|
|
labelExpensesImage = new JLabel(""); |
|
|
Image image2 = new ImageIcon(this.getClass().getResource("/wings-icon.png")).getImage(); |
|
|
Image image2 = new ImageIcon(this.getClass().getResource("/wings-icon.png")).getImage(); |
|
|
labelExpensesImage.setIcon(new ImageIcon(image2)); |
|
|
labelExpensesImage.setIcon(new ImageIcon(image2)); |
|
|
|
|
|
|
|
|
labelExpensesImage.setBounds(450, 59, 46, 55); |
|
|
|
|
|
|
|
|
labelExpensesImage.setBounds(400, 22, 46, 55); |
|
|
contentPane.add(labelExpensesImage); |
|
|
contentPane.add(labelExpensesImage); |
|
|
|
|
|
|
|
|
labelBalancetImage = new JLabel("New labelBalance"); |
|
|
labelBalancetImage = new JLabel("New labelBalance"); |
|
|
Image image3 = new ImageIcon(this.getClass().getResource("/Money-icon.png")).getImage(); |
|
|
Image image3 = new ImageIcon(this.getClass().getResource("/Money-icon.png")).getImage(); |
|
|
labelBalancetImage.setIcon(new ImageIcon(image3)); |
|
|
labelBalancetImage.setIcon(new ImageIcon(image3)); |
|
|
|
|
|
|
|
|
labelBalancetImage.setBounds(553, 59, 34, 55); |
|
|
|
|
|
|
|
|
labelBalancetImage.setBounds(543, 22, 34, 55); |
|
|
contentPane.add(labelBalancetImage); |
|
|
contentPane.add(labelBalancetImage); |
|
|
|
|
|
|
|
|
JLabel budgetAusgeben = new JLabel("Ausgaben"); |
|
|
JLabel budgetAusgeben = new JLabel("Ausgaben"); |
|
@ -149,10 +150,21 @@ 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); |
|
|
|
|
|
|
|
|
this.budgetDispaly = new JLabel("0.0 \u20AC"); |
|
|
|
|
|
budgetDispaly.setFont(new Font("Tahoma", Font.BOLD, 12)); |
|
|
|
|
|
this.budgetDispaly.setBounds(255, 82, 86, 14); |
|
|
contentPane.add(this.budgetDispaly); |
|
|
contentPane.add(this.budgetDispaly); |
|
|
|
|
|
|
|
|
|
|
|
JLabel expensesDisplay = new JLabel("0.0 \u20AC"); |
|
|
|
|
|
expensesDisplay.setFont(new Font("Tahoma", Font.BOLD, 12)); |
|
|
|
|
|
expensesDisplay.setBounds(390, 82, 110, 14); |
|
|
|
|
|
contentPane.add(expensesDisplay); |
|
|
|
|
|
|
|
|
|
|
|
JLabel balanceDisplay = new JLabel("0.0 \u20AC"); |
|
|
|
|
|
balanceDisplay.setFont(new Font("Tahoma", Font.BOLD, 12)); |
|
|
|
|
|
balanceDisplay.setBounds(543, 82, 85, 14); |
|
|
|
|
|
contentPane.add(balanceDisplay); |
|
|
|
|
|
|
|
|
this.text1.addActionListener(this); |
|
|
this.text1.addActionListener(this); |
|
|
this.text2.addActionListener(this); |
|
|
this.text2.addActionListener(this); |
|
|
this.senden.addActionListener(this); |
|
|
this.senden.addActionListener(this); |
|
|