You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/pages/learn/01_tutorial/07_rich_client_apps/01_javafx/06_all_together.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -186,7 +186,7 @@ Our Person UI application uses single selection mode for the ListView.
186
186
<aid="list-view-sort"> </a>
187
187
## ListView and Sort
188
188
189
-
Suppose you want to sort the list of names by last name and then first name. JavaFX has several ways to sort lists. Since we need to keep names sorted, we’ll wrap the underlying `ObservableArrayList` in a [`SortedList`](javafxdoc:SortedList).
189
+
Suppose you want to sort the list of names by last name and then first name. JavaFX has several ways to sort lists. Since we need to keep names sorted, we’ll wrap the underlying `observableArrayList` in a [`SortedList`](javafxdoc:SortedList).
190
190
To keep the list sorted in ListView, we invoke [`ListView`](javafxdoc:ListView)’s setItems() method with the sorted list. A comparator specifies the ordering.
191
191
First, we compare each person’s last name for sorting and then the first names if necessary. To set the sorting, the `setComparator()` method uses an anonymous class or, more succinctly, a lambda expression:
0 commit comments