Browse Source

Nur Einreihen des Codes

Mohamed
Adah Boukhari 5 years ago
parent
commit
951df223d5
  1. BIN
      Budget Projekt/bin/MeinBudgetView/LoginFrame.class
  2. BIN
      Budget Projekt/bin/MeinBudgetView/MeinGui$1.class
  3. BIN
      Budget Projekt/bin/MeinBudgetView/MeinGui.class
  4. BIN
      Budget Projekt/bin/MeinBudgetView/MyTest.class
  5. 4
      Budget Projekt/src/MeinBudgetView/LoginFrame.java
  6. 3
      Budget Projekt/src/MeinBudgetView/MeinGui.java
  7. 4
      Budget Projekt/src/MeinBudgetView/MyMain.java
  8. 23
      Budget Projekt/src/MeinBudgetView/MyTest.java

BIN
Budget Projekt/bin/MeinBudgetView/LoginFrame.class

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

BIN
Budget Projekt/bin/MeinBudgetView/MeinGui.class

BIN
Budget Projekt/bin/MeinBudgetView/MyTest.class

4
Budget Projekt/src/MeinBudgetView/LoginFrame.java

@ -31,7 +31,7 @@ public class LoginFrame extends JFrame implements ActionListener {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 450, 300); setBounds(100, 100, 450, 300);
contentPane = new JPanel(); contentPane = new JPanel();
contentPane.setBackground(Color.CYAN);
contentPane.setBackground(Color.orange);
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane); setContentPane(contentPane);
contentPane.setLayout(null); contentPane.setLayout(null);
@ -85,7 +85,7 @@ public class LoginFrame extends JFrame implements ActionListener {
} }
if (ae.getSource() == this.anmelden && benutzername.getText().length() > 0 if (ae.getSource() == this.anmelden && benutzername.getText().length() > 0
&& passwordField.getText().length() > 0) { && passwordField.getText().length() > 0) {
MeinGui run = new MeinGui();
MeinGui run = new MeinGui();
run.setVisible(true); run.setVisible(true);
} }

3
Budget Projekt/src/MeinBudgetView/MeinGui.java

@ -55,13 +55,12 @@ public class MeinGui extends JFrame implements ActionListener {
private static JLabel budgetBetrag; private static JLabel budgetBetrag;
private static JTable myTable; private static JTable myTable;
public MeinGui() { public MeinGui() {
setTitle("Budget"); setTitle("Budget");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 654, 368); setBounds(100, 100, 654, 368);
contentPane = new JPanel(); contentPane = new JPanel();
contentPane.setBackground(Color.CYAN);
contentPane.setBackground(Color.orange);
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane); setContentPane(contentPane);
contentPane.setLayout(null); contentPane.setLayout(null);

4
Budget Projekt/src/MeinBudgetView/MyMain.java

@ -1,9 +1,9 @@
package MeinBudgetView; package MeinBudgetView;
public class MyMain { public class MyMain {
public static void main(String[] args) { public static void main(String[] args) {
LoginFrame myFrame = new LoginFrame();
LoginFrame myFrame = new LoginFrame();
myFrame.setVisible(true); myFrame.setVisible(true);
} }

23
Budget Projekt/src/MeinBudgetView/MyTest.java

@ -45,22 +45,23 @@ class MyTest {
assertNotEquals("-" + 4321.0 + "€", MeinGui.setExpensesView()); assertNotEquals("-" + 4321.0 + "€", MeinGui.setExpensesView());
} }
@Test
@Test
public void testSetBenutzername() { public void testSetBenutzername() {
String result = String.valueOf(LoginFrame.benutzername);
assertEquals(result, LoginFrame.setBenutzername());
assertNotEquals(result + " ", LoginFrame.setBenutzername());
assertNotEquals(null, LoginFrame.setBenutzername());
String result = String.valueOf(LoginFrame.benutzername);
assertEquals(result, LoginFrame.setBenutzername());
assertNotEquals(result + " ", LoginFrame.setBenutzername());
assertNotEquals(null, LoginFrame.setBenutzername());
} }
@Test @Test
public void testSetPassword() { public void testSetPassword() {
String result = String.valueOf(LoginFrame.passwordField); String result = String.valueOf(LoginFrame.passwordField);
assertEquals(result, LoginFrame.setPassword());
assertNotEquals(result + " ", LoginFrame.setPassword());
assertNotEquals(null, LoginFrame.setPassword());
assertEquals(result, LoginFrame.setPassword());
assertNotEquals(result + " ", LoginFrame.setPassword());
assertNotEquals(null, LoginFrame.setPassword());
} }
} }
Loading…
Cancel
Save