diff --git a/nashorn/samples/clickcounter.fxml b/nashorn/samples/clickcounter.fxml new file mode 100644 index 00000000000..3bc39a1bf58 --- /dev/null +++ b/nashorn/samples/clickcounter.fxml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + // button click handler + var clickCount = 0; + function onButtonClick(event) { + // get another control via scene object + var scene = event.source.scene; + var textField = scene.lookup("#nameText"); + + print(textField.text + ", you clicked " + ++clickCount + " times!"); + } + + + + + + + +