BUG: Text Components Are Not Brighter for Editable ControlsLast reviewed: January 29, 1998Article ID: Q178645 |
The information in this article applies to:
SYMPTOMSThe java.awt.TextArea and java.awt.TextField controls do not use a brighter color when they can be edited.
CAUSEIn builds of the Virtual Machine for Java prior to 2252 a brighter color was used to represent an editable control.
RESOLUTIONSee the sample code below for a potential workaround.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONThe 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 AFC, the UIEdit control does not change color when it is editable.
REFERENCESFor the latest Knowledge Base articles and other support information on Visual J++ and the SDK for Java, see the following page on the Microsoft Technical Support site:
http://support.microsoft.com/support/visualj/ http://support.microsoft.com/support/java/ Keywords : kbcode AWTPkg JAFC JVM Technology : kbInetDev internet Version : WINDOWS:2.0,2.01,4.0,4.01 Platform : WINDOWS Issue type : kbbug |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |