private void addConnectionToTree(Connection conn) {
        DefaultTreeModel defTreeModel = (DefaultTreeModel)getModel();

        DefaultMutableTreeNode rootNode = (DefaultMutableTreeNode)getModel().getRoot();

        DefaultMutableTreeNode nameNode = new DefaultMutableTreeNode(conn.getName(), true);
        DefaultMutableTreeNode tablesNode = new DefaultMutableTreeNode("Tables", true);
        DefaultMutableTreeNode confNode = new DefaultMutableTreeNode("Configuration", true);

        nameNode.setUserObject(conn);
        nameNode.add(tablesNode);
        nameNode.add(confNode);

        for(Table mtable : conn.getTableList()) {
            DefaultMutableTreeNode tableNode = new DefaultMutableTreeNode(mtable.getName(), true);
            tablesNode.add(tableNode);
            tableNode.setUserObject(mtable);
        }

        rootNode.add(nameNode);
        defTreeModel.setRoot(rootNode);

        for(int i=0; i<getRowCount(); i++) {
            expandRow(i);
        }
    }