FIX: TextField and TextArea Are Not Grayed Out on Call to Component.disable()ID: Q214760
|
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 virtual machine (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/ and following the "downloads" link on the left.
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 virtual machine version 2613 for Visual J++ 6.0 Tech Preview 1.
Q169803 INFO: Historical List of Shipping Vehicles for Microsoft VM
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/
© Microsoft Corporation 1999, All Rights Reserved.
Contributions by Robert LaCasse, Microsoft Corporation
Additional query words: AWTPkg, Microsoft VM ,
Keywords : kbSDKJava150fix kbVJ110fix kbGrpJava
Version : WINDOWS:1.0,1.1,1.5,1.51,2.0,2.01,2.02
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: July 28, 1999