Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: added source code

...

When new rate or value is entered all action listeners of that component are noticed with actionPerformed() method (java.awt.ActionListener). To construct classes which implements ActionListner interface SwingBuilder provides action() builder method. One of this method's attributes is closure when we are able to provide our closure with application logic. The closure argument has ActionEvent type.

Download the source code of the example: SwingBuilderObserver.groovy