On Mon, 11 Dec 2023 11:25:34 GMT, Tejesh R <t...@openjdk.org> wrote: > The issue is w.r.t to way that Synth prints the table. In Synth, the printing > of Table happens column wise by painting blocks of columns which is due to > the fact that Graphics used which is `ProxyGrpahics2D` (which get selected in > `RasterPrinterJob `class, otherwise it would be `WPathGraphics` for other > Look and feel). Since the printing happens in block wise and the columns > where the x position is greater than the `table.bounds` doesn't gets painted > because of the intersection check condition `!bounds.intersects(clip)`. Hence > only droplines are painted instead of cells and gridlines. I couldn't find > any reason for adding the intersection check here and when removed it didn't > cause any regression too, rather it solves the issue and actually made sense > too. In other Look and Feel its not required to apply the fix (in > `BasicTableUI `class) because its not affecting anything yet since the > painting happens for whole table. Hence proposing the fix for only > SynthTableUI class. > ([PrintManualTest_FitWidthMultiple.java](https://github.com/openjdk/jdk/blob/master/test/jdk/javax/swing/JTable/PrintManualTest_FitWidthMultiple.java)) > test is been used for testing.
This was my output without the fix: <img width="681" alt="Screenshot 2024-01-16 at 3 32 33 PM" src="https://github.com/openjdk/jdk/assets/96267980/92cbfe1b-fcf0-4651-bece-abf0ee25f5bd"> This was my output with the fix: <img width="680" alt="Screenshot 2024-01-16 at 3 33 13 PM" src="https://github.com/openjdk/jdk/assets/96267980/a4ddc2d5-f413-474a-824d-943c0adc8169"> Comparing it to the description/example you gave on the difference, I can't seem to recreate that change. These screenshots were generated by using the ```Print``` option on the test and outputting to a PDF file. Any insights for why I'm not seeing the same thing? ------------- PR Comment: https://git.openjdk.org/jdk/pull/17053#issuecomment-1894738624