Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- try{
- String var = "";
- File ft=new File("src\\log\\pegawai.txt");
- Scanner in=new Scanner(ft);
- Vector<String> vt=new Vector<String>();
- while(in.hasNextLine())
- {
- vt.add(in.nextLine());
- }
- while(true) {
- String ma = gett.getText();
- boolean sama = false;
- for(String s : vt) {
- if(ma.equals(s)) {
- sama = true;
- }
- }
- if(sama) {
- JOptionPane.showMessageDialog(null, "Selamat Anda Login Pegawai !");
- new pilhanpegawai().setVisible(true);
- dispose();
- break;
- } else {
- JOptionPane.showMessageDialog(null, "Salah Bro, coba lagi ya");
- continue;
- }
- }
- }
- catch(IOException e){}
- }
Advertisement
Add Comment
Please, Sign In to add comment