An event callback script can query the event parameters using the
java::event command. Usually, there is only one event parameter
-- the event object, which stores various information about the
event as its properties. For example, when the mouseClicked
event occurs inside an AWT Button, the x and y properties
of the event object contains the location of the mouse cursor. The
following script prints out the location of the mouse cursor:
Example:
set button [java::new jawa.awt.Button]
java::bind $button mouseClicked {
puts "mouse click at ([java::event x],[java::event y])"
}