I need to change tree nodes color when business logic updates model, wait 1 second, and then change its color back.
Basically I would like to create similar thing like here Changing JList row color at runtime, but for JTree.
So I could use a similar technique,but I also wont to change ancestor nodes color, so user could see notification even if not is not expanded.
How can I do it?
Check this Highlight a node's descendants in JTree
You could easily modify it to instead highlight the parent and now you only need to plug in a solution for the timed highlighting like the solution I provided on the other thread. Highlight, timer, unset highlight.
Using SwingWorker plus maybe an Executor if the updates to the model are frequent and you want some control over the execution of the highlighting threads