import java.util.List; import javafx.collections.FXCollections; import javafx.collections.SortedList; public class TestSortedList implements Comparable { private int value; public TestSortedList(int value) { this.value = value; } @Override public String toString() { return String.valueOf(value); } @Override public int compareTo(TestSortedList o) { return Integer.valueOf(this.value).compareTo(o.value); } public static void main(String[] args) { List original = FXCollections.observableArrayList( new TestSortedList(1), new TestSortedList(2), new TestSortedList(3), new TestSortedList(4)); SortedList sorted = new SortedList( original); System.out.println(sorted); original.get(3).value = 0; original.set(3, original.get(3)); System.out.println(sorted); } }