J
John
I use JTrees all the time, but I have come across some strange
behaviour. This one has a custom CellRenderer and a custom TreeModel.
If I configure the tree elsewhere and then execute this code, "3" will
be printed for some TreeModels but not for others (no exceptions etc.,
it just stops at orderTree.setModel(tm)!).
System.out.println("1");
TreeModel tm = ldm.getOrderTreeModel(orderNumber);
System.out.println("2");
orderTree.setModel(tm);
System.out.println("3");
Bizarrely, if I create / configure a new JTree each time, all TreeModels
work.
I could spend a bit of time creating a self contained example, but was
wondering if any readers have experience of this sort of problem.
John
behaviour. This one has a custom CellRenderer and a custom TreeModel.
If I configure the tree elsewhere and then execute this code, "3" will
be printed for some TreeModels but not for others (no exceptions etc.,
it just stops at orderTree.setModel(tm)!).
System.out.println("1");
TreeModel tm = ldm.getOrderTreeModel(orderNumber);
System.out.println("2");
orderTree.setModel(tm);
System.out.println("3");
Bizarrely, if I create / configure a new JTree each time, all TreeModels
work.
I could spend a bit of time creating a self contained example, but was
wondering if any readers have experience of this sort of problem.
John