Browse Source

Konflikt behoben

master
Adah Boukhari 5 years ago
parent
commit
008a5420e9
  1. BIN
      Budget Projekt/bin/MeinBudgetView/LoginFrame$1.class
  2. BIN
      Budget Projekt/bin/MeinBudgetView/LoginFrame.class
  3. 72
      Budget Projekt/src/MeinBudgetView/LoginFrame.java
  4. 6
      Budget Projekt/src/MeinBudgetView/MeinGui.java

BIN
Budget Projekt/bin/MeinBudgetView/LoginFrame$1.class

BIN
Budget Projekt/bin/MeinBudgetView/LoginFrame.class

72
Budget Projekt/src/MeinBudgetView/LoginFrame.java

@ -0,0 +1,72 @@
package MeinBudgetView;
import java.awt.BorderLayout;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JButton;
import javax.swing.JPasswordField;
import javax.swing.JTextField;
import javax.swing.JLabel;
import java.awt.Color;
public class LoginFrame extends JFrame {
private JPanel contentPane;
private JPasswordField passwordField;
private JTextField textField;
/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
LoginFrame frame = new LoginFrame();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
/**
* Create the frame.
*/
public LoginFrame() {
setTitle("Anmelden");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 450, 300);
contentPane = new JPanel();
contentPane.setBackground(Color.WHITE);
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(null);
JButton anmelden = new JButton("Anmelden");
anmelden.setBounds(182, 168, 97, 23);
contentPane.add(anmelden);
passwordField = new JPasswordField();
passwordField.setBounds(147, 137, 132, 20);
contentPane.add(passwordField);
textField = new JTextField();
textField.setBounds(147, 106, 132, 20);
contentPane.add(textField);
textField.setColumns(10);
JLabel lblNewLabel = new JLabel("Benutzername:");
lblNewLabel.setBounds(48, 106, 89, 20);
contentPane.add(lblNewLabel);
JLabel lblNewLabel_1 = new JLabel("Password: ");
lblNewLabel_1.setBounds(61, 140, 76, 14);
contentPane.add(lblNewLabel_1);
}
}

6
Budget Projekt/src/MeinBudgetView/MeinGui.java

@ -241,7 +241,7 @@ public class MeinGui extends JFrame implements ActionListener {
exitButton();
}
if (ae.getSource() == this.loeschen) {
leerButton();
leeren();
}
budget = Double.parseDouble(text1.getText());
@ -262,11 +262,11 @@ public class MeinGui extends JFrame implements ActionListener {
}
public void exitButton() {
public static void exitButton() {
System.exit(0);
}
public static void leerButton() {
public static void leeren() {
text1.setText(null);
text2.setText(null);
budgetDispaly.setText(null);

Loading…
Cancel
Save