rendered paste body
private void btnLogInActionPerformed(java.awt.event.ActionEvent evt) {
String sessieId;
try {
sessieId = balie.logIn(tfAccount.getText(), new String(fldPassword.getPassword()));
System.out.println("de sessie"+ sessieId);
if (sessieId == null) {
setMessage("Accountname and/or password not correct.");
} else {
//RemotePropertyListener l = new BankierSessieDialog(balie, sessieId);
RemotePropertyListener l = new BankierSessieDialog();
balie.addListener( l,sessieId);
dispose();
}
} catch (Exception e1) {
/....
}
public class BankierSessieDialog extends javax.swing.JFrame implements
RemotePropertyListener {
private IRemoteBalie balie;
private String sessieId;
private RekeningKlantInfo rekeningKlantInfo;
//remove this testing construct.
public BankierSessieDialog() throws RemoteException{
System.out.println("BankieSessieDialog constructor");
UnicastRemoteObject.exportObject(this,0);
}
//remove above
public BankierSessieDialog(IRemoteBalie balie, String sessieId) throws RemoteException {
initComponents();
UnicastRemoteObject.exportObject(this,0);
this.balie = balie;
this.sessieId = sessieId;
try {
this.rekeningKlantInfo = balie.getRekeningKlantInfo(sessieId);
//...gui inits..
} catch (Exception exc) {
// ...
}