void (AntMessage[] messages) { DefaultMutableTreeNode parentNode = (DefaultMutableTreeNode)myParentPath.getLastPathComponent(); int[] indices = new int[messages.length]; for (int i = 0; i < messages.length; i++) { AntMessage message = messages[i]; MessageNode messageNode = createMessageNode(message); indices[i] = parentNode.getChildCount(); parentNode.insert(messageNode, indices[i]); myMessageItems.add(messageNode); } myTreeModel.nodesWereInserted(parentNode, indices); handleExpansion(); }