JTable argTable = new JTable(new DefaultTableModel(data, columnNames));
JTable argTable = new JTable(new DefaultTableModel(data, columnNames)) { public boolean isCellEditable(int row, int column) { return false; } };
  public void displayAbout() {    ArrayList agentNames =       (ArrayList)console.getNodePropertyValue(nodeName, "AgentNames");    // If got no Agent Names, that probably means    // we have no configuration info for the Node,    // so we won't display that portion of     // the info window    if (agentNames != null) {      // clone the agent names so we don't modify them when we add the NodeAgent      agentNames = (ArrayList)agentNames.clone();      agentNames.add(0, nodeName);    }    JPanel aboutPanel = new JPanel();    aboutPanel.setLayout(new GridBagLayout());    int x = 0;    int y = 0;    // insets are top, left, bottom, right    aboutPanel.add(new JLabel("Status:"),                   new GridBagConstraints(x++, y, 1, 1, 0.0, 0.0,                                          GridBagConstraints.WEST,                                          GridBagConstraints.NONE,                                          new Insets(10, 0, 5, 5),                                          0, 0));    String status = ((NodeStatusButton)statusButton).getStatusDescription();    aboutPanel.add(new JLabel(status),                   new GridBagConstraints(x, y++, 1, 1, 1.0, 0.0,                                          GridBagConstraints.WEST,                                          GridBagConstraints.HORIZONTAL,                                          new Insets(10, 0, 5, 0),                                          0, 0));    x = 0;    aboutPanel.add(new JLabel("Notifications:"),                   new GridBagConstraints(x++, y, 1, 1, 0.0, 0.0,                                          GridBagConstraints.WEST,                                          GridBagConstraints.NONE,                                          new Insets(0, 0, 5, 5),                                          0, 0));    int notifyCount = consoleTextPane.getNotifyCount();    aboutPanel.add(new JLabel(Integer.toString(notifyCount)),                   new GridBagConstraints(x, y++, 1, 1, 1.0, 0.0,                                          GridBagConstraints.WEST,                                          GridBagConstraints.HORIZONTAL,                                          new Insets(0, 0, 5, 0),                                          0, 0));    x = 0;    aboutPanel.add(new JLabel("Log File:"),                   new GridBagConstraints(x++, y, 1, 1, 0.0, 0.0,                                          GridBagConstraints.WEST,                                          GridBagConstraints.NONE,                                          new Insets(0, 0, 5, 5),                                          0, 0));    aboutPanel.add(new JTextField(logFileName),                   new GridBagConstraints(x, y++, 1, 1, 1.0, 0.0,                                          GridBagConstraints.WEST,                                          GridBagConstraints.HORIZONTAL,                                          new Insets(0, 0, 5, 0),                                          0, 0));    x = 0;    aboutPanel.add(new JLabel("Host Name:"),                   new GridBagConstraints(x++, y, 1, 1, 0.0, 0.0,                                          GridBagConstraints.WEST,                                          GridBagConstraints.NONE,                                          new Insets(0, 0, 5, 5),                                          0, 0));    aboutPanel.add(new JLabel(hostName),                   new GridBagConstraints(x, y++, 1, 1, 1.0, 0.0,                                          GridBagConstraints.WEST,                                          GridBagConstraints.HORIZONTAL,                                          new Insets(0, 0, 5, 0),                                          0, 0));    x = 0;    aboutPanel.add(new JLabel("Host Address:"),                   new GridBagConstraints(x++, y, 1, 1, 0.0, 0.0,                                          GridBagConstraints.WEST,                                          GridBagConstraints.NONE,                                          new Insets(0, 0, 5, 5),                                          0, 0));    String hostAddress = "";    try {      InetAddress host = InetAddress.getByName(hostName);      hostAddress = host.toString();    } catch (UnknownHostException uhe) {    }    aboutPanel.add(new JLabel(hostAddress),                   new GridBagConstraints(x, y++, 1, 1, 1.0, 0.0,                                          GridBagConstraints.WEST,                                          GridBagConstraints.HORIZONTAL,                                          new Insets(0, 0, 5, 0),                                          0, 0));    x = 0;    aboutPanel.add(new JLabel("Host Type:"),                   new GridBagConstraints(x++, y, 1, 1, 0.0, 0.0,                                          GridBagConstraints.WEST,                                          GridBagConstraints.NONE,                                          new Insets(0, 0, 5, 5),                                          0, 0));    aboutPanel.add(new JLabel((String)console.getHostPropertyValue(hostName,                                                            "MachineType")),                   new GridBagConstraints(x, y++, 1, 1, 1.0, 0.0,                                          GridBagConstraints.WEST,                                          GridBagConstraints.HORIZONTAL,                                          new Insets(0, 0, 5, 0),                                          0, 0));    x = 0;    aboutPanel.add(new JLabel("Host Location:"),                   new GridBagConstraints(x++, y, 1, 1, 0.0, 0.0,                                          GridBagConstraints.WEST,                                          GridBagConstraints.NONE,                                          new Insets(0, 0, 5, 5),                                          0, 0));    aboutPanel.add(new JLabel((String)console.getHostPropertyValue(hostName,                                                            "Location")),                   new GridBagConstraints(x, y++, 1, 1, 1.0, 0.0,                                          GridBagConstraints.WEST,                                          GridBagConstraints.HORIZONTAL,                                          new Insets(0, 0, 5, 0),                                          0, 0));    x = 0;    aboutPanel.add(new JLabel("Host Description:"),                   new GridBagConstraints(x++, y, 1, 1, 0.0, 0.0,                                          GridBagConstraints.WEST,                                          GridBagConstraints.NONE,                                          new Insets(0, 0, 5, 5),                                          0, 0));    aboutPanel.add(new JLabel((String)console.getHostPropertyValue(hostName,                                                            "Description")),                   new GridBagConstraints(x, y++, 1, 1, 1.0, 0.0,                                          GridBagConstraints.WEST,                                          GridBagConstraints.HORIZONTAL,                                          new Insets(0, 0, 5, 0),                                          0, 0));    x = 0;    aboutPanel.add(new JLabel("Node Description: "),                   new GridBagConstraints(x++, y, 1, 1, 0.0, 0.0,                                          GridBagConstraints.WEST,                                          GridBagConstraints.NONE,                                          new Insets(0, 0, 5, 5),                                          0, 0));    aboutPanel.add(new JLabel((String)console.getNodePropertyValue(nodeName,                                              "Description")),                   new GridBagConstraints(x, y++, 1, 1, 1.0, 0.0,                                          GridBagConstraints.WEST,                                          GridBagConstraints.HORIZONTAL,                                          new Insets(0, 0, 5, 0),                                          0, 0));    x = 0;    // display -D options    aboutPanel.add(new JLabel("-D Options (in CSMART):"),                   new GridBagConstraints(x++, y, 1, 1, 0.0, 0.0,                                          GridBagConstraints.WEST,                                          GridBagConstraints.NONE,                                          new Insets(0, 0, 5, 5),                                          0, 0));    Vector data = new Vector();    Enumeration propertyNames = properties.propertyNames();    while (propertyNames.hasMoreElements()) {      String name = (String)propertyNames.nextElement();      Vector row = new Vector(2);      row.add(name);      row.add(properties.getProperty(name));      data.add(row);    }    Vector columnNames = new Vector(2);    columnNames.add("Name");    columnNames.add("Value");    JTable argTable = new JTable(new DefaultTableModel(data, columnNames));    argTable.getTableHeader().setReorderingAllowed(false);    argTable.setColumnSelectionAllowed(false);    argTable.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION);    argTable.setPreferredScrollableViewportSize(new Dimension(50, 100));    JScrollPane jspArgTable = new JScrollPane(argTable);    // ensure the layout leaves space for the scrollbar    jspArgTable.setMinimumSize(new Dimension(50, 50));    aboutPanel.add(jspArgTable,                   new GridBagConstraints(x, y++, 1, 1, 1.0, 1.0,                                          GridBagConstraints.WEST,                                          GridBagConstraints.BOTH,                                          new Insets(0, 0, 5, 0),                                          0, 0));    x = 0;    aboutPanel.add(new JLabel("Command Line Arguments:"),                   new GridBagConstraints(x++, y, 1, 1, 0.0, 0.0,                                          GridBagConstraints.WEST,                                          GridBagConstraints.NONE,                                          new Insets(0, 0, 5, 5),                                          0, 0));    JScrollPane jspArgs = new JScrollPane(new JList(args.toArray()));    jspArgs.setMinimumSize(new Dimension(50, 50));    aboutPanel.add(jspArgs,                   new GridBagConstraints(x, y++, 1, 1, 1.0, 1.0,                                          GridBagConstraints.WEST,                                          GridBagConstraints.BOTH,                                          new Insets(0, 0, 5, 0),                                          0, 0));    x = 0;    // Only show initial configuration info if we had some    if (agentNames != null) {      // Now the contents of the Node      aboutPanel.add(new JLabel("Agents (initial configuration):"),		     new GridBagConstraints(x, y++, 1, 1, 0.0, 0.0,					    GridBagConstraints.WEST,					    GridBagConstraints.NONE,					    new Insets(0, 0, 5, 5),					    0, 0));      aboutPanel.add(new JLabel("(select for more information)"),		     new GridBagConstraints(x++, y, 1, 1, 0.0, 0.0,					    GridBagConstraints.WEST,					    GridBagConstraints.NONE,					    new Insets(0, 0, 5, 5),					    0, 0));            // Put together the list of Agents in the Node      JList agentsList = null;      if (agentNames == null)	agentsList = new JList();      else	agentsList = new JList(agentNames.toArray());      agentsList.setBackground(aboutPanel.getBackground());            // Allow user to select an Agent in the list and get the detailed      // contents of that Agent in a pop-up window      agentsList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);      agentsList.addListSelectionListener(new ListSelectionListener() {	  public void valueChanged(ListSelectionEvent e) {	    if (e.getValueIsAdjusting())	      return;	    JList myagentsList = (JList)e.getSource();	    String agentName = (String)myagentsList.getSelectedValue();	    if (agentName != null)	      displayPlugins(agentName);	  }	});            JScrollPane jspAgents = new JScrollPane(agentsList);      jspAgents.setMinimumSize(new Dimension(50, 50));      aboutPanel.add(jspAgents,		     new GridBagConstraints(x, y++, 1, 1, 1.0, 1.0,					    GridBagConstraints.WEST,					    GridBagConstraints.BOTH,					    new Insets(0, 0, 5, 0),					    0, 0));    } // end of block to show configuration info        JOptionPane.showMessageDialog(this, aboutPanel,                                   "Information: " + nodeName +                                  " (" + hostName + ")",                                  JOptionPane.PLAIN_MESSAGE);  }