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

setBackground() with TextFields got useless after bug 'fix'...

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.3.0
    • client-libs
    • generic
    • generic



      Name: boT120536 Date: 01/10/2001


      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
      Java HotSpot(TM) Client VM (build 1.3.0, mixed mode)


      In the past, up until JDK 1.3, it used to be possible to set the background
      color of a TextField (editable or not). Because of some complaint from Java
      Blend (from what i read in the bug list), you guys changed the behavior, so now
      an editable TextField is always white, while an uneditable one is grey. This is
      EVEN AFTER you call setBackground(Color). Why??? I don't mind that the default
      way of painting it is with those colors, but what's against being able to set
      it explicitly? Now there's no way anymore to set the background color of a
      TextField (and perhaps TextArea, i'm not sure). I used different background
      colors for different TextFields in an applet, to show what category they belong
      to. This worked fine, until Netscape 6, because it uses Java2: they're all the
      same color now.

      My suggestion is to keep the default this way, but at least give you the
      possibility to explicitly set the color with setBackground(Color). I don't
      think anyone would disagree with that.

      I'm not the only one not liking your previous 'solution', by the way.. here
      some comments from other users i found in the Bug Database:

      =====
      Tue Nov 14 23:25:13 PST 2000
      eliasen

      This really is a horrible solution--and the only reason it's being changed is
      for Java Blend. It breaks every other application in the field that wants to
      to render text in a box and have control over the color. You can now no longer
      read the text in our applications. The other solution seems to be that we have
      to rebuild all of the functionality of TextArea (scroll bars, text wrapping,
      etc,) just to be able to control the color. Please change this behavior back to
      the way it's worked since day 1!
      =====

      I wish to register a complaint about the resolution of
      issue. As I understand it, the decision was made that non-
      editable text areas will always use the system color. (I am
      getting this behavior with J2 1.3) This SHOULD NOT BE DONE
      when an explicit color is set after the edit flag has been
      set.

      I figured that since the issue was "resolved" in its
      current fashion based on the number of complaints, I would
      add my voice as a complaint in the other direction.
      =====
      (Review ID: 114909)
      ======================================================================

            ehawkessunw Eric Hawkes (Inactive)
            bonealsunw Bret O'neal (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: