Article ID: 178645
Article Last Modified on 8/25/2005
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.
Keywords: kbbug kbfix kbcode KB178645