Name: rmT116609 Date: 04/15/2004
A DESCRIPTION OF THE REQUEST :
Please add ability to know when JTree.getRowCount() has changed.
When we add listeners to the model to find out when nodes have been inserted or removed then call JTree.getRowCount() from the event notification, the row count sometimes hasn't been updated yet.
The problem is that the TreeState has also added listeners to the model, and the ordering that our listeners and the TreeState listeners get notified in changes sometimes.
JUSTIFICATION :
We want to make the preferred size of our JTrees based on rowCount and not visible row count.
CUSTOMER SUBMITTED WORKAROUND :
workaround 1: call SwingUtilities.invokeLater from the event notification in order to make sure the state listeners have been called 1st.
workaround 2: override JTree.treeDidChange() to notify our listeners that the row count may have changed.
(Incident Review ID: 230402)
======================================================================