JFrame frame = uiFactory.getJFrame(serviceItem);
frame.validate();
frame.setVisible(true);
}
else if(JWindowFactory.class.isAssignableFrom(factoryClass)) {
JWindowFactory uiFactory = (JWindowFactory)factory;
JWindow window = uiFactory.getJWindow(serviceItem);
window.validate();
window.setVisible(true);
} else if(JComponentFactory.class.isAssignableFrom(factoryClass)) {
JComponentFactory uiFactory = (JComponentFactory)factory;
JComponent component = uiFactory.getJComponent(serviceItem);
String name = component.getAccessibleContext().getAccessibleName();
if(name==null) {
component.getAccessibleContext().setAccessibleName(component.getClass().getName());
}
JComponentFrame componentFrame = new JComponentFrame(component, name);
componentFrame.setLocationRelativeTo(parent);
componentFrame.setVisible(true);
} else if(JDialogFactory.class.isAssignableFrom(factoryClass)) {
JDialogFactory uiFactory = (JDialogFactory)factory;
JDialog dialog = uiFactory.getJDialog(serviceItem);
dialog.validate();
dialog.setVisible(true);
}
} catch (Exception e) {
Util.showError(e, parent, "Service UI Exception");