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

When adding TextField to Dialog, the backgorund and foreground are both black.

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      generic, x86
    • OS:
      solaris_2.5.1, windows_95

      Description

      JDK Version:1.2beta3-L
      OS:Win95
      Locale: All

      This is a awt bug not i18n bug.
      In Windows 95, JDK Version is 1.2beta3-L.
      When adding TextField to a dialog, the TextField's background and foreground
      are both black. So, we can see nothing.
      Following is a program that can show this problem.
      =============================CheckColor.java=================================
      import java.awt.*;
      import java.awt.event.*;

      public class CheckColor {
          OptionDlg option;
          public static void main(String args[]) {
              new CheckColor();
          }

          public CheckColor() {
              Frame f = new Frame("Check Color");
              option = new OptionDlg(f);
              f.pack();
              f.setVisible(true);
              option.setVisible(true);
          }
      }

      class OptionDlg extends Dialog {
          TextField tf1;
          TextField tf2;

          public OptionDlg(Frame f) {
              super(f);
              setLayout(new GridLayout(2, 1));
              tf1 = new TextField("1000", 5);
              tf2 = new TextField(5);
              add(tf1);
              add(tf2);
              pack();
          }
      }
      ============================================================================



      jim.hu@prc 1998-03-12

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ehawkessunw Eric Hawkes (Inactive)
              Reporter:
              jhusunw Jim Hu (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: