-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
5.0
-
Cause Known
-
sparc
-
solaris_10
I have added a button to a scrollpane and I have added the scrollpane to a frame. After the frame is made visible, I am changing the Foreground/Background color of the frame on clicking a button. I expect the button to inherit the new color from the frame and change it's label color accordingly.
But on XToolkit, the button is not inheriting the color from it's parent when the color is changed at run time. Button inherits properly when the color is set for the scrollpane upfront. But when changing the color of either the SP or the frame at runtime, the component is insensitive to it.
This happens only when I have a scrollpane in the component hierarchy. Whatever is inside the scrollpane becomes insensitive to color changes of it's ancestors. If I replace scrollpane with a panel and change the color of the frame, it works properly.
Everything works fine on Motif and the above issues are seen only on XAWT. Reproducible on Mustang as well as Tiger. On Win32, colors are not at all inherited by the components, be it Scrollpane or Panel.
I have attached a sample test. Execute the sample test. You would see 2 buttons. One is actually placed inside a panel and other is (right side one) placed inside a scrollpane. Click any of the buttons. This would change the FG color of the frame. Now you would see left side button's label changing to RED color but not the right side button. That's because right side button is placed inside the scrollpane.
But on XToolkit, the button is not inheriting the color from it's parent when the color is changed at run time. Button inherits properly when the color is set for the scrollpane upfront. But when changing the color of either the SP or the frame at runtime, the component is insensitive to it.
This happens only when I have a scrollpane in the component hierarchy. Whatever is inside the scrollpane becomes insensitive to color changes of it's ancestors. If I replace scrollpane with a panel and change the color of the frame, it works properly.
Everything works fine on Motif and the above issues are seen only on XAWT. Reproducible on Mustang as well as Tiger. On Win32, colors are not at all inherited by the components, be it Scrollpane or Panel.
I have attached a sample test. Execute the sample test. You would see 2 buttons. One is actually placed inside a panel and other is (right side one) placed inside a scrollpane. Click any of the buttons. This would change the FG color of the frame. Now you would see left side button's label changing to RED color but not the right side button. That's because right side button is placed inside the scrollpane.
- relates to
-
JDK-6354805 Scrollpane does not re-validate the components when changing the font size at runtime, XToolkit
-
- Open
-