command(Component,MethodInvocation)where Component is a component7.1 and MethodInvocation is a call to a method. The command means that when Component is clicked, then execute MethodInvocation. Only one command can be executed for each component. Trying to associate two method invocations with a component will cause an error.
Commands can appear anywhere a constraint can occur. A command has to take a component as the first argument even if the command appears in a component declaration.
MethodInvocation is a call to a method defined some where. The following method
showDocument(String name)is a built-in where name is a name or path for a document to be shown when the corresponding component is clicked. Document names are all relative to the code base. It is unnecessary to specify full URL addresses.
Figure is a program that associates an action with every component in the AllComponents object ac.