void (@NotNull JTable table) { if (!SystemInfoRt.isMac) { return; } if (table.isEditing()) { int column = table.getEditingColumn(); int row = table.getEditingRow(); Component renderer = column>=0 && row >= 0 ? table.getCellRenderer(row, column) .getTableCellRendererComponent(table, table.getValueAt(row, column), true, table.hasFocus(), row, column) : null; Component component = table.getEditorComponent(); if (component != null && renderer != null) { changeBackGround(component, renderer.getBackground()); } } }