1 6 7 package org.coach.tracing.server.viewer; 8 9 import javax.swing.*; 10 import javax.swing.tree.*; 11 12 16 public class IdentityTreeFrame extends javax.swing.JFrame { 17 18 19 public IdentityTreeFrame() { 20 initComponents(); 21 IdentityModel model = new IdentityModel(IdentityNode.getRootNode()); 22 JTree tree = new JTree(model); 23 this.getContentPane().add(tree); 24 pack(); 25 } 26 27 32 private void initComponents() { 34 addWindowListener(new java.awt.event.WindowAdapter () { 35 public void windowClosing(java.awt.event.WindowEvent evt) { 36 exitForm(evt); 37 } 38 }); 39 40 pack(); 41 } 43 44 private void exitForm(java.awt.event.WindowEvent evt) { dispose(); 46 } 48 51 public static void main(String args[]) { 52 new IdentityTreeFrame().show(); 53 } 54 55 56 59 } 60 | Popular Tags |