Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6246500

Text Components do not inherit foreground color property from it's ancestor, on XToolkit

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 5.0
    • client-libs
    • sparc
    • solaris_9

      All components are supposed to inherit the foreground color from the ancestor if one is not set explicitly. But TextArea and TextField ignore the foreground color of the anscestor and use it's own default when one is not set explicitly. This is incorrect. It would make the text components look very odd when such a property is being set at the application level (for one of the top-levels).

      Background color is also not inherited but it has been specified explicitly in the setBackground() method of the Component class. One such case must be mentioned for ForeGround Color also if this is going to be the case.

      This is reproducible only on Xtoolkit and not on win32. Reproducible since Tiger.

      I have attached a sample test. Execute it on XToolkit. Check whether the text inside the text components appear in blue color. If not, the bug is reproduced. (Here I am setting the foreground, background colors to the parent frame to which text components are added).
      ###@###.### 2005-03-27 16:39:55 GMT

            dav Andrei Dmitriev (Inactive)
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: