@ -20,6 +20,8 @@ import javax.swing.JComboBox;
import javax.swing.JTextArea ;
import java.awt.Color ;
import javax.swing.JSeparator ;
import javax.swing.JScrollPane ;
import javax.swing.JTable ;
public class MeinGui extends JFrame implements ActionListener {
@ -45,6 +47,7 @@ public class MeinGui extends JFrame implements ActionListener {
private JLabel ausgabenName ;
private JLabel ausgabenBetrag ;
private JLabel budgetBetrag ;
private JTable myTable ;
/ * *
* Launch the application .
@ -75,8 +78,8 @@ public class MeinGui extends JFrame implements ActionListener {
contentPane . setLayout ( null ) ;
this . berechne = new JButton ( "Berechne" ) ;
berechne . setToolTipText ( "" ) ;
berechne . setBounds ( 78 , 281 , 110 , 23 ) ;
berechne . setToolTipText ( "" ) ;
contentPane . add ( berechne ) ;
this . senden = new JButton ( "Senden" ) ;
@ -94,16 +97,16 @@ public class MeinGui extends JFrame implements ActionListener {
text2 . setColumns ( 10 ) ;
labelHauptImage = new JLabel ( "" ) ;
labelHauptImage . setBounds ( 10 , 0 , 86 , 61 ) ;
Image image0 = new ImageIcon ( this . getClass ( ) . getResource ( "/budgetapp.png" ) ) . getImage ( ) ;
labelHauptImage . setIcon ( new ImageIcon ( image0 ) ) ;
labelHauptImage . setFont ( new Font ( "Tahoma" , Font . BOLD , 13 ) ) ;
labelHauptImage . setBounds ( 10 , 0 , 86 , 61 ) ;
contentPane . add ( labelHauptImage ) ;
JLabel budgetEingeben = new JLabel ( "Budget eingeben" ) ;
budgetEingeben . setFont ( new Font ( "Estrangelo Edessa" , Font . BOLD , 14 ) ) ;
budgetEingeben . setBounds ( 10 , 72 , 110 , 20 ) ;
budgetEingeben . setFont ( new Font ( "Estrangelo Edessa" , Font . BOLD , 14 ) ) ;
contentPane . add ( budgetEingeben ) ;
JLabel labelBudget = new JLabel ( "Budget" ) ;
@ -119,34 +122,31 @@ public class MeinGui extends JFrame implements ActionListener {
contentPane . add ( labelBalance ) ;
labelBudgetImage = new JLabel ( "" ) ;
labelBudgetImage . setBounds ( 255 , 22 , 46 , 55 ) ;
Image image1 = new ImageIcon ( this . getClass ( ) . getResource ( "/money.png" ) ) . getImage ( ) ;
labelBudgetImage . setIcon ( new ImageIcon ( image1 ) ) ;
labelBudgetImage . setBounds ( 255 , 22 , 46 , 55 ) ;
contentPane . add ( labelBudgetImage ) ;
labelExpensesImage = new JLabel ( "" ) ;
labelExpensesImage . setBounds ( 400 , 22 , 46 , 55 ) ;
Image image2 = new ImageIcon ( this . getClass ( ) . getResource ( "/wings-icon.png" ) ) . getImage ( ) ;
labelExpensesImage . setIcon ( new ImageIcon ( image2 ) ) ;
labelExpensesImage . setBounds ( 400 , 22 , 46 , 55 ) ;
contentPane . add ( labelExpensesImage ) ;
labelBalancetImage = new JLabel ( "New labelBalance" ) ;
labelBalancetImage . setBounds ( 543 , 22 , 34 , 55 ) ;
Image image3 = new ImageIcon ( this . getClass ( ) . getResource ( "/Money-icon.png" ) ) . getImage ( ) ;
labelBalancetImage . setIcon ( new ImageIcon ( image3 ) ) ;
labelBalancetImage . setBounds ( 543 , 22 , 34 , 55 ) ;
contentPane . add ( labelBalancetImage ) ;
JLabel budgetAusgeben = new JLabel ( "Ausgaben" ) ;
budgetAusgeben . setFont ( new Font ( "Estrangelo Edessa" , Font . BOLD , 14 ) ) ;
budgetAusgeben . setBounds ( 10 , 185 , 63 , 14 ) ;
budgetAusgeben . setFont ( new Font ( "Estrangelo Edessa" , Font . BOLD , 14 ) ) ;
contentPane . add ( budgetAusgeben ) ;
this . leeren = new JLabel ( "Eintr\u00E4ge leeren" ) ;
leeren . setFont ( new Font ( "Estrangelo Edessa" , Font . BOLD , 14 ) ) ;
leeren . setBounds ( 363 , 246 , 115 , 14 ) ;
leeren . setFont ( new Font ( "Estrangelo Edessa" , Font . BOLD , 14 ) ) ;
contentPane . add ( leeren ) ;
this . loeschen = new JButton ( "L\u00F6schen" ) ;
@ -158,28 +158,28 @@ public class MeinGui extends JFrame implements ActionListener {
contentPane . add ( exit ) ;
JLabel beendne = new JLabel ( "Beenden" ) ;
beendne . setFont ( new Font ( "Estrangelo Edessa" , Font . BOLD , 14 ) ) ;
beendne . setBounds ( 508 , 246 , 81 , 14 ) ;
beendne . setFont ( new Font ( "Estrangelo Edessa" , Font . BOLD , 14 ) ) ;
contentPane . add ( beendne ) ;
budgetDispaly = new JLabel ( "0.0 \u20AC" ) ;
budgetDispaly . setFont ( new Font ( "Tahoma" , Font . BOLD , 12 ) ) ;
budgetDispaly . setBounds ( 255 , 82 , 86 , 14 ) ;
budgetDispaly . setFont ( new Font ( "Tahoma" , Font . BOLD , 12 ) ) ;
contentPane . add ( budgetDispaly ) ;
expensesDisplay = new JLabel ( "0.0 \u20AC" ) ;
expensesDisplay . setFont ( new Font ( "Tahoma" , Font . BOLD , 12 ) ) ;
expensesDisplay . setBounds ( 390 , 82 , 110 , 14 ) ;
expensesDisplay . setFont ( new Font ( "Tahoma" , Font . BOLD , 12 ) ) ;
contentPane . add ( expensesDisplay ) ;
balanceDisplay = new JLabel ( "0.0 \u20AC" ) ;
balanceDisplay . setFont ( new Font ( "Tahoma" , Font . BOLD , 12 ) ) ;
balanceDisplay . setBounds ( 543 , 82 , 85 , 14 ) ;
balanceDisplay . setFont ( new Font ( "Tahoma" , Font . BOLD , 12 ) ) ;
contentPane . add ( balanceDisplay ) ;
textExpensesName = new JTextField ( ) ;
textExpensesName . setToolTipText ( "" ) ;
textExpensesName . setBounds ( 60 , 221 , 128 , 20 ) ;
textExpensesName . setToolTipText ( "" ) ;
contentPane . add ( textExpensesName ) ;
textExpensesName . setColumns ( 10 ) ;
@ -195,6 +195,17 @@ public class MeinGui extends JFrame implements ActionListener {
budgetBetrag . setBounds ( 10 , 100 , 46 , 14 ) ;
contentPane . add ( budgetBetrag ) ;
JScrollPane scrollPane = new JScrollPane ( ) ;
scrollPane . setBounds ( 511 , 205 , - 186 , - 67 ) ;
contentPane . add ( scrollPane ) ;
JScrollPane scrollPane_1 = new JScrollPane ( ) ;
scrollPane_1 . setBounds ( 323 , 126 , 197 , 88 ) ;
contentPane . add ( scrollPane_1 ) ;
myTable = new JTable ( ) ;
scrollPane_1 . setViewportView ( myTable ) ;
text1 . addActionListener ( this ) ;
text2 . addActionListener ( this ) ;
senden . addActionListener ( this ) ;
@ -255,5 +266,4 @@ public class MeinGui extends JFrame implements ActionListener {
String result = balance + " €" ;
return result ;
}
}