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

[macosx] What is background color of AWT component? (And foreground, for that matter)

XMLWordPrintable

    • b11
    • generic, x86
    • os_x
    • Verified

      http://java.net/jira/browse/MACOSX_PORT-608 submitted 2011/10/26 by Yuri Nesterenko
      I'm attaching an example with a Button. For this Button, issued setBackround(Color.GREEN) but it was not honored, background was regular off-white. Foreground is honored though.
      There's also a Choice, it is even more interesting. Suppose you set background to BLUE and foreground also to BLUE. With Choice you have a compact view with only selected item visible and an open view with a list of items. Now, in compact view you have background as in that Button above, white, and foreground blue. In open view, background is blue and foreground is white.
      What it should be? Obviously everywhere else it is just as you set it.
      Note that getBackground/getForeground reports my values, not actual.
      Note also that in Apple JDK 6 all these colors are totally consistently ignored. I'm not sure we should call it regression!

            serb Sergey Bylokhov
            vasya Vassili Igouchkine (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: