FIX: Text Components Are Not Brighter for Editable Controls

SYMPTOMS

The java.awt.TextArea and java.awt.TextField controls do not use a brighter
color when they can be edited.

CAUSE

In builds of the Virtual Machine for Java prior to 2252 a brighter color
was used to represent an editable control.

RESOLUTION

See the sample code below for a potential workaround.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. This problem has been fixed in Internet
Explorer 4.01 Service Pack 1, and SDK for Java 2.02.

MORE INFORMATION

The sample code below illustrates the problem and a potential way to
workaround the problem by calling brighter():

import com.ms.ui.*;import java.awt.*;class test {  public static void main(String args[])  {  java.awt.Color c = new java.awt.Color(255,40,168);  Frame f = new Frame("AWT Frame");  f.setSize(320,200);  f.setLayout(new GridLayout(3,0));  TextArea edit1=new TextArea("Read Only");  TextArea edit2=new TextArea("Editable (Should match brighter color)");  TextArea edit3=new TextArea("Brighter");  edit1.setBackground(c);  edit1.setEditable(false);  edit2.setBackground(c);  edit2.setEditable(true);  // workaround:  set background to brighter color.  edit3.setBackground(c.brighter());  edit3.setEditable(true);  f.add(edit1);  f.add(edit2);  f.add(edit3);  f.setVisible(true);  }}
NOTE: In the Application Foundation Classes (AFC), the UIEdit control does
not change color when it is editable.

REFERENCES

For the latest Knowledge Base articles and other support information on
Visual J++ and the SDK for Java, see the following pages on the Microsoft
Technical Support site:

Propiedades

Id. de artículo: 178645 - Última revisión: 02/14/2017 - Revisión: 1

Microsoft Internet Explorer 4.01 128-Bit Edition, Microsoft Internet Explorer 4.01 128-Bit Edition, Microsoft Internet Explorer 4.0 128-Bit Edition, Microsoft Internet Explorer 4.0 128-Bit Edition, Microsoft Internet Explorer 4.01 128-Bit Edition, Microsoft Internet Explorer 4.01 128-Bit Edition, Microsoft Internet Explorer 4.0 128-Bit Edition, Microsoft Internet Explorer 4.0 128-Bit Edition, Microsoft Software Development Kit for Java 2.02, Microsoft Software Development Kit for Java 2.01, Microsoft Virtual Machine for Java

Comentarios