-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.java
37 lines (30 loc) · 1.06 KB
/
Main.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map;
public class Main {
static Map<String, String> accounts = new HashMap<String, String>();
public static void main(String[] args) throws FileNotFoundException {
try {
BufferedReader buf = new BufferedReader(new FileReader("accounts.txt"));
String line;
while ((line = buf.readLine()) != null) {
String[] words = line.split(" ");
accounts.put(words[0], words[1]);
}
buf.close();
} catch (Exception e) {
PrintWriter writer = new PrintWriter("accounts.txt");
writer.close();
}
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new LoginFrame().setVisible(true);
}
});
}
}