void (final int index) { final int selectedRow=getSelectedRow(); // Expand property final Property property=myProperties.get(index); final String dottedName = getDottedName(property); // it's possible that property was expanded and we switched to a component which doesn't have this property if (myExpandedProperties.contains(dottedName)) return; myExpandedProperties.add(dottedName); final Property[] children=getPropChildren(property); for (int i = 0; i < children.length; i++) { myProperties.add(index + i + 1, children[i]); } myModel.fireTableDataChanged(); // Restore selected row if(selectedRow!=-1){ getSelectionModel().setSelectionInterval(selectedRow,selectedRow); } }