Java Reference
In-Depth Information
3. Use an onMouseClicked event handler to retrieve the item from the view. You can
get the currently selected item using the ListView.selectedItem property when
the mouse is clicked on the control.
listView. onMouseClicked = function (e) {
var item = listView. selectedItem as MyItem;
panel.content = [
Label{text:"You selected item {}"}
When the code is executed, it renders the list as shown in the next screenshot.
See also
F Introduction
F Creating a form with JavaFX controls
Using the Slider control to input numeric
We have seen how to capture data input using traditional GUI controls such as TextBoxes and
Buttons. The Slider control offers a different means of inputting data by sliding a knob along a
groove. In this recipe, we use the Slider control to create a color picker application.
Search WWH ::

Custom Search