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

setBackground() on Textarea/TextFields doesn't work (Win L&F)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.2.1
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_nt

      Description



      Name: krT82822 Date: 07/01/99


      Calling setBackground(Color.lightGray) does not work.
      It set the background to white. This is not a problem with 1.1.7.

      -------------------

      kevin.ryan@eng -- verified, even with JDK 1.2.2 RC1. Thought we already had a bug re. this, but couldn't find it.

      import java.awt.*;

      public class blah extends Frame {

          public blah() {
              super();
              // couldn't get it to work without Swing-style semantics
              getContentPane().setLayout(new BorderLayout());

              TextArea ta = new TextArea();
              ta.setSize(200,200);
              ta.setBackground(Color.lightGray);
              ta.setForeground(Color.blue);
              ta.setText("This is the full extent of the text behind which we'd like to see a light Gray background.");

              getContentPane().add(ta, BorderLayout.CENTER);
              pack();
          }

          public static void main(String[] args) {
              blah f = new blah();
              f.setLocation(200, 200);
              f.setVisible(true);
          }
      }

      (Review ID: 85068)
      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ehawkessunw Eric Hawkes (Inactive)
                Reporter:
                kryansunw Kevin Ryan (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: