Question

I've created a custom Table structure by combining a JTree and JTable.

it looks like this:

enter image description here

addition of leafs can be done to any element.

But when I try to add a node to a row which has children already, the link in not shown and the newly added row is also not shown.

this is how it looks when a new row is added to "Package":

enter image description here

But this problem does not occurred when a node is appended to a leaf.

But there are no errors or exceptions thrown.

after a node is added i do the following:

fireTableDataChanged
fireTableStructureChanged
scrollPathToVisible

although these are called the problem remains.

can anyone please give a suggestion?

thanks in advance...

Was it helpful?

Solution

Try calling updateUI() on the JTable or JTree. updateUI() will propagate, rendering the rest of the components beneath it.

http://docs.oracle.com/javase/6/docs/api/javax/swing/JTable.html#updateUI()

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top