Skip to content

Commit d1d566f

Browse files
committed
Minor changes
1 parent ef92077 commit d1d566f

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

accounts

337 Bytes
Binary file not shown.

src/main/java/data_access/UserDatabase.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,14 @@ public class UserDatabase implements UserExists, UserRetriever, UserCreator, IRe
1717
File accounts;
1818
List<User> accountList;
1919
public UserDatabase(){
20-
this.accounts = new File("TestUserDatabase3.csv");
20+
this.accounts = new File("accounts");
21+
if(!accounts.exists()){
22+
try {
23+
accounts.createNewFile();
24+
} catch (IOException e) {
25+
throw new RuntimeException(e);
26+
}
27+
}
2128
this.accountList = this.getList();
2229
}
2330
public UserDatabase(File accounts){

src/main/java/screens/user_registration_screen/LoginRegisterScreen.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package screens.user_registration_screen;
22

33
import data_access.UserDatabase;
4+
import interface_adapters.login_interface_adapters.Login;
45
import screens.login_screen.UserLoginUI;
56
import screens.user_registration_screen.UserRegistrationUI;
67

@@ -24,9 +25,17 @@ public LoginRegisterScreen(){
2425
message.setBounds(10, 30, 200, 25);
2526
loginRegPanel.add(message);
2627
login.setBounds(10, 60, 70, 30);
28+
login.addActionListener(this);
2729
register.setBounds(110, 60, 70, 30);
28-
}
30+
register.addActionListener(this);
31+
loginRegPanel.add(login);
32+
loginRegPanel.add(register);
33+
loginRegFrame.setVisible(true);
2934

35+
}
36+
public static void main(String[] args){
37+
LoginRegisterScreen screen = new LoginRegisterScreen();
38+
}
3039
@Override
3140
public void actionPerformed(ActionEvent e) {
3241
if(e.getSource().equals(login)){

0 commit comments

Comments
 (0)