3 Answers
3

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

First, when the business model is updated, make sure you fire the appropriate tree updated event in your tree model so the JTree will know to update.

Then you'll need to define a TreeCellRenderer that sets the color. When the business model is updated, tell your renderer which nodes to highlight.

However, the trick here is turning the color off. You can define a Thread or better yet an Executor to sleep for 1000 millis then tells the renderer to no longer highlight the nodes, then fire the tree update events again so the JTree will repaint appropriately.