|
|
@ -7,13 +7,18 @@ import javax.swing.JPanel; |
|
|
|
import javax.swing.border.EmptyBorder; |
|
|
|
import javax.swing.JTextField; |
|
|
|
import java.awt.Image; |
|
|
|
import java.awt.event.ActionEvent; |
|
|
|
import java.awt.event.ActionListener; |
|
|
|
|
|
|
|
import javax.swing.ImageIcon; |
|
|
|
import javax.swing.JButton; |
|
|
|
import javax.swing.JLabel; |
|
|
|
import java.awt.Font; |
|
|
|
import javax.swing.JComboBox; |
|
|
|
import javax.swing.JTextArea; |
|
|
|
import java.awt.Color; |
|
|
|
|
|
|
|
public class MeinGui extends JFrame { |
|
|
|
public class MeinGui extends JFrame implements ActionListener { |
|
|
|
|
|
|
|
private JPanel contentPane; |
|
|
|
private JTextField text1; |
|
|
@ -22,7 +27,11 @@ public class MeinGui extends JFrame { |
|
|
|
JLabel labelExpensesImage; |
|
|
|
JLabel labelBalancetImage; |
|
|
|
JLabel labelHauptImage; |
|
|
|
|
|
|
|
JButton senden; |
|
|
|
JButton berechne; |
|
|
|
JLabel leeren; |
|
|
|
JButton loeschen; |
|
|
|
JButton exit; |
|
|
|
/** |
|
|
|
* Launch the application. |
|
|
|
*/ |
|
|
@ -51,12 +60,12 @@ public class MeinGui extends JFrame { |
|
|
|
setContentPane(contentPane); |
|
|
|
contentPane.setLayout(null); |
|
|
|
|
|
|
|
JButton berechne = new JButton("Berechne"); |
|
|
|
this.berechne = new JButton("Berechne"); |
|
|
|
berechne.setToolTipText(""); |
|
|
|
berechne.setBounds(10, 281, 110, 23); |
|
|
|
contentPane.add(berechne); |
|
|
|
|
|
|
|
JButton senden = new JButton("Senden"); |
|
|
|
this.senden = new JButton("Senden"); |
|
|
|
senden.setBounds(10, 145, 110, 23); |
|
|
|
contentPane.add(senden); |
|
|
|
|
|
|
@ -121,15 +130,43 @@ public class MeinGui extends JFrame { |
|
|
|
budgetAusgeben.setBounds(10, 221, 63, 14); |
|
|
|
contentPane.add(budgetAusgeben); |
|
|
|
|
|
|
|
JLabel leeren = new JLabel("Eintr\u00E4ge leeren"); |
|
|
|
this.leeren = new JLabel("Eintr\u00E4ge leeren"); |
|
|
|
leeren.setFont(new Font("Estrangelo Edessa", Font.BOLD, 14)); |
|
|
|
leeren.setBounds(432, 221, 115, 14); |
|
|
|
leeren.setBounds(363, 246, 115, 14); |
|
|
|
contentPane.add(leeren); |
|
|
|
|
|
|
|
JButton loeschen = new JButton("L\u00F6schen"); |
|
|
|
loeschen.setBounds(442, 239, 89, 30); |
|
|
|
this.loeschen = new JButton("L\u00F6schen"); |
|
|
|
loeschen.setBounds(368, 266, 89, 30); |
|
|
|
contentPane.add(loeschen); |
|
|
|
|
|
|
|
this.exit = new JButton("Exit\r\n"); |
|
|
|
exit.setBounds(494, 266, 95, 30); |
|
|
|
contentPane.add(exit); |
|
|
|
|
|
|
|
JLabel beendne = new JLabel("Beenden"); |
|
|
|
beendne.setFont(new Font("Estrangelo Edessa", Font.BOLD, 14)); |
|
|
|
beendne.setBounds(508, 246, 81, 14); |
|
|
|
contentPane.add(beendne); |
|
|
|
|
|
|
|
this.text1.addActionListener(this); |
|
|
|
this.text2.addActionListener(this); |
|
|
|
this.senden.addActionListener(this); |
|
|
|
this.berechne.addActionListener(this); |
|
|
|
this.loeschen.addActionListener(this); |
|
|
|
this.exit.addActionListener(this); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void actionPerformed(ActionEvent ae) { |
|
|
|
|
|
|
|
if (ae.getSource() == this.exit) { |
|
|
|
System.exit(0); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |