void (int rowIndex) { int selectedRow = getSelectedRow(); Property property = myProperties.get(rowIndex); String path = property.getPath(); if (myExpandedProperties.contains(path)) { return; } myExpandedProperties.add(path); List<Property> properties = getFilterChildren(property); myProperties.addAll(rowIndex + 1, properties); myModel.fireTableDataChanged(); if (selectedRow != -1) { if (selectedRow > rowIndex) { selectedRow += properties.size(); } getSelectionModel().setSelectionInterval(selectedRow, selectedRow); } Rectangle rectStart = getCellRect(selectedRow, 0, true); Rectangle rectEnd = getCellRect(selectedRow + properties.size(), 0, true); scrollRectToVisible( new Rectangle(rectStart.x, rectStart.y, rectEnd.x + rectEnd.width - rectStart.x, rectEnd.y + rectEnd.height - rectStart.y)); }