public void treeWillExpand(TreeExpansionEvent event) throws ExpandVetoException {
				DefaultMutableTreeNode node = (DefaultMutableTreeNode) event.getPath().getLastPathComponent();
				Category category = (Category) node.getUserObject();

				if (node.getChildCount() == 1) {
					DefaultMutableTreeNode node2 = (DefaultMutableTreeNode) node.getChildAt(0);
					Category category2 = (Category) node2.getUserObject();

					// if the child is the loadCats, replace the children by the right children of the category
					if (category2 == loadCats) {
						setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
						node.removeAllChildren();

						for (Category category1 : category.getChildren()) {
							node.add(nonRecursive(category1));
						}
						((DefaultTreeModel) categoryTree.getModel()).reload(node);
						setCursor(Cursor.getDefaultCursor());
					}
				}
			}