Curaccountradio.addselectionlistener (New Selectionadapter ()
{
public void widgetselected (Selectionevent e)
{
Confirmbtn.setenabled (TRUE);
Try
{
Account = (Ibankaccount) naming.lookup (
Logininterface.serviceaddr + "Currentaccount");
Account.setid (Availableaccount.getcurid ());
}
catch (RemoteException re)
{
MessageBox Exitdlg = new MessageBox (Parent.getshell ());
Exitdlg.settext ("Network connectivity problem ....") " );
Exitdlg.setmessage ("Cannot connect to the server.) " );
Exitdlg.open ();
System.exit (0);
Re.printstacktrace ();
}
catch (Exception ex)
{
Ex.printstacktrace ();
}
}
});
Credaccountradio.addselectionlistener (New Selectionadapter ()
{
public void widgetselected (Selectionevent e)
{
Confirmbtn.setenabled (TRUE);
Try
{
Account = (Ibankaccount) naming.lookup (
Logininterface.serviceaddr + "Creditaccount");
Account.setid (Availableaccount.getcredid ());
}
catch (RemoteException re)
{
MessageBox Exitdlg = new MessageBox (Parent.getshell ());
Exitdlg.settext ("Network connectivity problem ....") " );
Exitdlg.setmessage ("Cannot connect to the server, the system will exit.") " );
Exitdlg.open ();
System.exit (0);
Re.printstacktrace ();
}
catch (Exception ex)
{
Ex.printstacktrace ();
}
}
});
Depaccountradio.addselectionlistener (New Selectionadapter ()
{
public void widgetselected (Selectionevent e)
{
Confirmbtn.setenabled (TRUE);
Try
{
Account = (Ibankaccount) naming.lookup (
Logininterface.serviceaddr + "Depositaccount");
Account.setid (Availableaccount.getdepid ());
}
catch (RemoteException re)
{
MessageBox Exitdlg = new MessageBox (Parent.getshell ());
Exitdlg.settext ("Network connectivity problem ....") " );
Exitdlg.setmessage ("Cannot connect to the server, the system will exit.") " );
Exitdlg.open ();
System.exit (0);
Re.printstacktrace ();
}
catch (Exception ex)
{
Ex.printstacktrace ();
}
}
});
PLEASESELECTLBL = new Label (parent, SWT. NONE);
Pleaseselectlbl.settext ("Please select your account type:");
Pleaseselectlbl.setbounds (29, 41, 130, 15);
SSC = new Serviceselectcomposite (parent);
CONFIRMBTN = new Button (parent, SWT. NONE);
Confirmbtn.setenabled (FALSE);
Confirmbtn.addmouselistener (New Mouseadapter ()
{
public void MouseDown (MouseEvent arg0)
{//click OK button
Setcontentsvisible (FALSE);
Ssc.setcontentsvisible (TRUE);
}
});
SSC.GETRETURNBTN (). Addmouselistener (New Mouseadapter ()
{///Click the Back button in the Service Selection window container
public void MouseDown (MouseEvent e)
{
Ssc.setcontentsvisible (FALSE);
Setcontentsvisible (TRUE);
}
});
Confirmbtn.settext ("OK");
Confirmbtn.setbounds (191, 135, 51, 27);
}
/**
* Set the visibility of controls in the Available Account Selection window
* @param b Visibility
*/
private void Setcontentsvisible (Boolean b)
{
Confirmbtn.setvisible (b);
Credaccountradio.setvisible (b);
Curaccountradio.setvisible (b);
Depaccountradio.setvisible (b);
Pleaseselectlbl.setvisible (b);
}
/**
* Set up available account selections
*/
private void setaccountsenabled ()
{
Try
{
if (Availableaccount.getcurid ()!= 0)
{//Current account available
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.