@Override
				public void fillRect( int x, int y, int width, int height ) {
					// do not paint last vertical line
					if( hideLastVerticalLine && verticalLines &&
						width == 1 && y == 0 && x == tableWidth - 1 &&
						wasInvokedFromPaintGrid() )
					  return;

					// reduce line thickness to avoid unstable painted line thickness
					if( lineThickness != 1 ) {
						if( horizontalLines && height == 1 && wasInvokedFromPaintGrid() ) {
							super.fill( new Rectangle2D.Double( x, y + lineOffset, width, lineThickness ) );
							return;
						}
						if( verticalLines && width == 1 && y == 0 && wasInvokedFromPaintGrid() ) {
							super.fill( new Rectangle2D.Double( x + lineOffset, y, lineThickness, height ) );
							return;
						}
					}

					super.fillRect( x, y, width, height );
				}
Toggle selection colors from focused to inactive and vice versa.

This is not an optimal solution but much easier than rewriting the whole paint methods.

Using a LaF specific renderer was avoided because often a custom renderer is
already used in applications. Then either the inactive colors are not used,
or the application has to be changed to extend a FlatLaf renderer.
flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatTableUI.java