JFrame frame = new JFrame();
frame.addWindowListener(new MyWindowListener());
ClientResource res = new ClientResourceImpl("TestClient");
ViewerFactory factory = new ViewerFactory(res);
factory.setCommandProcessor(new com.nexirius.framework.command.DefaultProcessor());
DataViewer v = factory.createDefaultEditor(model);
frame.getContentPane().add(v.getJComponent());
frame.pack();
frame.setVisible(true);