Java Reference
In-Depth Information
How to do it...
To illustrate how to use the standard JavaFX controls, we are going to create a data input form.
Because the full listing of the code is rather long, the abbreviated version presented here
shows the pertinent portion of the code. You can see the full version in ch04/source-code/
src/controls/DataFormDemo.fx .
def rdoBtns = ToggleGroup {};
var nameRow = HBox {spacing:7
content:[
VBox{content:[ Label {text:"First Name"},
TextBox { id :"fName"}]}
VBox{content:[ Label {text:"Last Name"},
TextBox { id :"lName"}]}
]
}
var addr1Row = HBox {
spacing:7
content:[
VBox{content:[Label{text:"Address"},
TextBox{id:"addr"}]}
VBox{content:[Label{text:"Suite"},
TextBox{id:"suite"}]}
]
}
var addr2Row = HBox {
spacing:7
content:[
VBox{content:[Label{text:"City"},
TextBox{id:"city"}]}
VBox{content:[Label{text:"Postal Code"},
TextBox{id:"pcode"}]}
]
}
var titleRow = HBox {spacing:7
content:[
HBox{
nodeVPos:VPos.CENTER spacing:7
content:[
Label{text:"Title:"}
RadioButton {
 
Search WWH ::




Custom Search