TextField: How do I change a TextField value when a event occurs?

1. Drop a textfiled on to the page
2. Drop a button
3. Double click the button to open its action method
4. In Button action handler put the following code:


5. deploy and run the application

Note: you can also set multiple textFields (or other components) in the same action method. ie, textField2.setValue("Sun Java Studio Creator");

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo