Main Scene
With the database loaded, we can now build the main UI part of our app. The Main Scene will have a search area on the top, and below we'll display the results of a search. The results will be displayed inside a ListView control, which is a scrollable list of items.
ListView displays its items as ListCell controls. ListCell is a generic type, where the generic parameter represents the item ListView is rendering. In our case, this is the DictionaryEntry type. Since we want to tell ListView how to render our DictionaryEntry type, we'll create our own DictionaryEntryCell type that extends ListCell and overrides its updateItem method. First, we'll add a new FXML file to the resources folder. dictionary_entry_cell.fxml represents the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access