Skip to content

Instantly share code, notes, and snippets.

@tarrsalah
Created March 12, 2013 14:54
Show Gist options
  • Save tarrsalah/5143557 to your computer and use it in GitHub Desktop.
Save tarrsalah/5143557 to your computer and use it in GitHub Desktop.
Change a button text when hovering
btn.textProperty().bind(
Bindings.when(new_btn.hoverProperty())
.then(new SimpleStringProperty("Hello!"))
.otherwise(new SimpleStringProperty("New"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment