Integer (Point point) { int row = TreeHoverListener.getHoveredRow(myComponent); if (row >= 0) return row; int rowIndex = myComponent.getRowForLocation(point.x, point.y); return rowIndex != -1 ? rowIndex : null; }