The information in this article applies to:
When making a call to the Component.disable method for an AWT TextArea or TextField, the text in the component's client area should be grayed out, but it is not.
Upgrade to a version of the Microsoft VM with a build number equal to or higher than 2613. You can find the latest Microsoft VM version by going to http://www.microsoft.com/java/ .
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.
This bug was corrected in Microsoft VM version 2613 for Visual J++ 6.0 Tech Preview 1.
If you have a version later than 2613 of the VM, you will see that the text is in fact grayed out as it should be.
import java.awt.*; public class CTATest extends Frame { static CTATest app; public static void main(String[] args) { app = new CTATest(); app.resize(400, 400); app.setLayout(new BorderLayout()); TextArea ta = new TextArea(); TextField tf = new TextField(); app.add("North", ta); app.add("South", tf); ta.appendText("This String should be grayed out."); tf.setText("This String should be grayed out."); ta.disable(); tf.disable(); app.show(); } public boolean handleEvent(Event e) { if (e.id == Event.WINDOW_DESTROY) { CTATest.app.dispose(); System.exit(0); return true; } return false; } }
For the latest Knowledge Base articles and other support information on Visual J++ and the SDK for Java, please see the following pages on the Microsoft Technical Support site:
http://support.microsoft.com/support/visualj/
http://support.microsoft.com/support/java/
AWTPkg, JVM