public static Chofer showForm(Chofer bean, boolean readOnly) { DefaultFormModel model = new DefaultFormModel(bean); model.setReadOnly(readOnly); final ChoferForm form = new ChoferForm(model); form.open(); if (!form.hasBeenCanceled()) { return (Chofer) model.getBaseBean(); } return null; }
public static void main(String[] args) { SWExtUIManager.setup(); Object bean = showForm(new Chofer()); ChoferForm.showObject(bean); System.exit(0); }