Point (@NotNull JTable table, @NotNull Rectangle visibleRect) { if (table.getComponentOrientation().isLeftToRight()) { return new Point(visibleRect.x, visibleRect.y); } else { return new Point(visibleRect.x + visibleRect.width, visibleRect.y); } }