}
/* create tabs */
JTabbedPane tabs = new JTabbedPane();
this.add(tabs);
{ // global statistics
JPanel panel = new JPanel();
panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));
panel.add(new JLabel("object types: " + classList.size()));
panel.add(new JLabel("materials: " + materialList.size()));
for (Stat stat : Stat.values()) {
panel.add(new JLabel(statNames.get(stat) + ": "
+ stats.getGlobalCount(stat)));
}
tabs.addTab("Global", null, panel, "Global statistics");
tabs.setMnemonicAt(0, KeyEvent.VK_G);
} { // statistics per material
JComponent component = createTableComponent(
columnNames, perMaterialData, comparators);
tabs.addTab("Materials", null, component,
"Statistics per material");
tabs.setMnemonicAt(1, KeyEvent.VK_M);
} { // statistics per class
JComponent component = createTableComponent(
columnNames, perClassData, comparators);
tabs.addTab("Classes", null, component,
"Statistics per WorldObject class");
tabs.setMnemonicAt(2, KeyEvent.VK_C);
}
setSize(800, 500);