I have this easy little form in my JavaFX application.
I want to use a button to change firstNameText
and firstNameText
.
I'm not capable, I'm a newbie. I tried the code below, where is my mistake?
def lastNameLabel = Label { text: "Last Name" };
def firstNameLabel = Label { text: "First Name" };
var lastNameText = TextBox { text: "Last Name" };
var firstNameText = TextBox { text: "First Name" };
def cancelButton = Button {
text: "Cancel"
action: function() {
lastNameText = TextBox { text: "ciao" };
firstNameText = TextBox { text: "ciao" };
}
};