Hello…
I´m trying to write a very simple JRubyFX application with an
EventHandler.
My code now:
require ‘jrubyfx’
class HelloWorldApp < JRubyFX::Application
def start(stage)
with(stage, title: "Hello World!", width: 800, height: 600) do
layout_scene do
button("Click me")
# button.setOnAction(new Bt_Action)
end
end
stage.show # Tip: most of the time, () can be removed from method
calls
end
end
Is it possible to write a button.setOnAction without writing a FXML
file?
Thanks