use of org.apache.zookeeper.inspector.gui.ZooInspectorPanel in project zookeeper by apache.
the class ZooInspector method main.
/**
* @param args
* - not used. The value of these parameters will have no effect
* on the application
*/
public static void main(String[] args) {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
JFrame frame = new JFrame("ZooInspector");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
iconResource = new IconResource();
final ZooInspectorPanel zooInspectorPanel = new ZooInspectorPanel(new ZooInspectorManagerImpl(), iconResource);
frame.addWindowListener(new WindowAdapter() {
@Override
public void windowClosed(WindowEvent e) {
super.windowClosed(e);
zooInspectorPanel.disconnect(true);
}
});
frame.setContentPane(zooInspectorPanel);
frame.setSize(1024, 768);
frame.setVisible(true);
} catch (Exception e) {
LoggerFactory.getLogger().error("Error occurred loading ZooInspector", e);
JOptionPane.showMessageDialog(null, "ZooInspector failed to start: " + e.getMessage(), "Error", JOptionPane.ERROR_MESSAGE);
}
}
Aggregations