There is no FXCollections.observableList
Establishment JavaFX draft, Intellij Idea No static method
FXCollectionsin the library
All the other methods don't work, either, even though the class and methods are in it.
In the class.
FXCollectionsThere are imports:
which Idea He doesn't find it either, and it looks like he's really gone. Jdk♪ Maybe that's the problem, but I don't know how to decide.
The thing is, this import.
import com.sun.javafx.collections.annotations.ReturnsUnmodifiableCollection;in the JDK class itself, and in com.sun there's a collections package, but it doesn't contain annotations package, neither.
javafx.collectionsI suspect that this is the problem (maybe it's because of the incorrect import of the class and not connected), but how do we solve it, and why does jdk have import from a non-existent package? Using JDK 1.8
How can com.sun be extra at JDK?
emmalee last edited by
Problem solved, the reason was my disrespect instead.
ObservableList datas = FXCollections.observableArrayList();
ObservableList<XYChart.Data> datas = new FXCollections.observableArrayList();
Of course, there was no such class. Thank you for your time.