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

TextArea.setBackground does not always work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.1.1, 1.3.0
    • client-libs
    • x86
    • windows_95, windows_nt



      Name: mc57594 Date: 05/27/97


      When the following code is run, the first text area appears white
      (it should be gray). The green one works for some reason.

      import java.awt.*;
       
      public class TextColor {
          public static void main(String args[]) {
       
              Frame f = new Frame("TextColor");
              TextArea t1 = new TextArea(10, 10);
              TextArea t2 = new TextArea(10, 10);
       
              f.setLayout(new FlowLayout());
              f.add(t1);
              f.add(t2);
       
              f.setBackground(Color.lightGray);
              t1.setBackground(Color.lightGray);
              t2.setBackground(Color.green);
       
              f.setSize(400, 400);
              f.show();
          }
      }


      ======================================================================

            ehawkessunw Eric Hawkes (Inactive)
            mchamnessunw Mark Chamness (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: