TornadoFX comes with Form control to deal with handling a large number of user inputs; having several input fields to take information from the user such as login or register is common.
You can create a form with any number of fields using the form builder. Creating a form is similar to creating the View, except the parent is the form layout.
In the following code, we show a form that is used to get the input word from the user and a button to get the meaning from the web:
form { fieldset(labelPosition = Orientation.VERTICAL) { field("Enter word", Orientation.VERTICAL) { inputWord = textfield() } buttonbar { button("Get meaning") { action { // Click event } } } } }
Each field represents a container with the label and another container ...