if (control.isUser(tnam.getText(), tpas.getText())){ JOptionPane.showMessageDialog(this, "Acces di Terima", "Perhatian .....", JOptionPane.INFORMATION_MESSAGE); dpp = control.gDPerson(tnam.getText().toString()); dp1 = dpp.substring(0,3); dp2 = dpp.substring(4); if (dpp == "120"){ JOptionPane.showMessageDialog(this, "Departemen MIS", "Perhatian .....", JOptionPane.INFORMATION_MESSAGE); } new MIS().setVisible(true); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); } else { JOptionPane.showMessageDialog(this, "Acces di Tolak", "Perhatian .....", JOptionPane.INFORMATION_MESSAGE); }