code sample icon Sample Code

In the source editor, add your action event processing code to the method that was generated automatically. Add your code after the line:

                               
// Add event code here...
                            

For example, add the following code, shown in bold:

                               
 public void myMethod(ActionEvent actionevent) {
      // Add event code here...
            
                                
System.out.println("!!!  Hello World  !!!");
  }
                              
                            

With this sample code, no actual processing is done. The text "Hello World" is simply printed out in the Log window at runtime.

Instead of typing the sample code, you can copy the code in this window and then paste it into the source editor.

Copyright © 1997, 2009, Oracle. All rights reserved.

false ,,,,,,,,,,,,,,,