for (int i = 0; i < level1; i++) {
List subList = new ArrayList(level2);
for (int j = 0; j < level2; j++) {
List subSubList = new ArrayList(level3);
for (int k = 0; k < level3; k++) {
subSubList.add(new DefaultTreeNode(new String[]{label + " " + rand.nextInt(level3),
rand.nextInt(level3)+"", df.format(cal.getTime())}));
cal.add(Calendar.MINUTE, 1);
}
subList.add(new DefaultTreeNode(new String[]{label + " " + rand.nextInt(level2),
rand.nextInt(level2)+"", df.format(cal.getTime())}, subSubList));
cal.add(Calendar.HOUR_OF_DAY, 1);
}
list.add(new DefaultTreeNode(new String[]{label + " " + rand.nextInt(level1),
rand.nextInt(level1)+"", df.format(cal.getTime())}, subList));
cal.add(Calendar.DAY_OF_MONTH, 1);
}
return new DefaultTreeModel(new DefaultTreeNode(null, list));
}