Component (JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { Component result = myRenderer.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); Object treeNode = null; final int modelRow = table.convertRowIndexToModel(row); if (myCurrentView == myTreeView) { TreePath path = myTreeView.getTree().getPathForRow(modelRow); if (path != null) { treeNode = path.getLastPathComponent(); } } else if (myCurrentView == myFlatView) { treeNode = myFlatView.getItems().get(modelRow); } myCellWrapper.wrap(result, table, value, isSelected, hasFocus, row, column, treeNode); return result; }