Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Button button = new Button("Login");
- button.addActionListener(new ActionListener() {
- public void actionPerformed(ActionEvent arg0) {
- String user=(String) textField.getText();
- String pass=(String) passwordField_1.getText();
- try {
- Context ctx = new InitialContext();
- String appName="";
- String moduleName="ProjectLibrary";
- String beanName="LB";
- String remoteInterface=LibraryRemote.class.getName();
- String name="ejb:"+appName+"/"+moduleName+"/"+beanName+"!"+remoteInterface;
- LibraryRemote proxy=(LibraryRemote) ctx.lookup(name);
- if(proxy.RechercheAdmin(user,pass)>0) {
- lblProblemInUser1.setVisible(true);
- }
- else {
- lblProblemInUser.setVisible(true);
- }
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement