void (Graphics2D g) { int leftRightInset = JBUI.CurrentTheme.Popup.Selection.LEFT_RIGHT_INSET.get(); Insets innerInsets = JBUI.CurrentTheme.Popup.Selection.innerInsets(); int offset = column > 0 && ExperimentalUI.isNewUI() ? -innerInsets.left - leftRightInset : 0; int i = 0; final TableColumnModel columnModel = table.getColumnModel(); while (i < column) { offset += columnModel.getColumn(i).getWidth(); i++; } g.translate(-offset, 0); // should increase the column width so that selection background will be visible even after offset translation setSize(getWidth() + offset, getHeight()); super.doPaint(g); g.translate(+offset, 0); }