On Thu, 18 Dec 2025 02:57:10 GMT, Prasanta Sadhukhan <[email protected]> wrote:
> [JDK-8224261](https://bugs.openjdk.org/browse/JDK-8224261) fix controls > background painting by checking if border is painted or not. This is wrong as > background should always be painted else background will not be painted if > border is not there > JProgressBar.setBorderPainted spec says " Some look and feels might not > implement painted borders; they will ignore this property." so not painting > border is ok but not painting background is an issue > > The JDK-8224261 is hereby backed out test/jdk/javax/swing/plaf/synth/TestSynthProgressBarBorder.java line 45: > 43: import javax.swing.UIManager; > 44: > 45: public class TestSynthProgressBarBorder { I would rename this to be specifically about Nimbus. GTK L&F is a synth L&F and its rendering is controlled by how GTK renders, so it may display a background the same as the parent container. test/jdk/javax/swing/plaf/synth/TestSynthProgressBarBorder.java line 54: > 52: Please check if 50% progress is rendered in the progress bar > 53: and rest 50% is rendered as blank bar > 54: with Nimbus default background color. Hmm. First I think Nimbus uses gradients, not solid colors. 2nd you are basically asking the tester to verify something they don't know. I read this and wonder "what is that default background, how do I know if it is right" ? Since the bug *specific to Nimbus* is that YOU know Nimbus paints a visually distinctive background is just to ask the tester to verify that. Although I believe this could actually be automated. You just need to verify that if you set the value to 0, then it passes if any pixel in the progress bar is different than the pixels of the parent container - which you can make a solid color I think. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/28885#discussion_r2632355779 PR Review Comment: https://git.openjdk.org/jdk/pull/28885#discussion_r2632365681
