public class MainEditor extends StandardStructEditor {
protected MainModel mainModel;
public JComponent createJComponent(ViewerFactory factory) {
JPanel panel = new JPanelWithBackgroundImage(factory.getClientResource(), "jnexBackground");
// JPanel panel = new JPanel();
panel.setLayout(new BorderLayout());
MemberListModel memberList = mainModel.getMemberList();
EmptyBorder emptyBorder = new EmptyBorder(5,10,5,10);
try {
JPanel persistenceSelector = createFieldEditor(MainModel.FIELD_PERSISTENCE_SELECTOR, factory);
persistenceSelector.setBorder(emptyBorder);
panel.add(persistenceSelector, BorderLayout.NORTH);
JComponent list = factory.createDefaultEditor(memberList).getJComponent();
list.setBorder(emptyBorder);
panel.add(list, BorderLayout.CENTER);
BorderLayout borderLayout = new BorderLayout();
borderLayout.setVgap(10);
JPanel south = new JPanel(borderLayout);
south.setBorder(emptyBorder);
south.setOpaque(false);
panel.add(south, BorderLayout.SOUTH);
JComponent selected = factory.createDefaultViewer(mainModel.getSelected().getChild("Person")).getJComponent();
south.add(selected, BorderLayout.CENTER);
JComponent address = factory.createDefaultViewer(mainModel.getAddress()).getJComponent();
south.add(address, BorderLayout.SOUTH);
} catch (Exception e) {