I was answering a question, where the solution was to use an observable collection like ObservableList
. Later I realised that I don't know if the solution is considered as "clean", since using ObservaleList
from the FXCollections is like using partly JavaFX but at the same time not using it.
Is it ok to use FXCollections and mixing them with let's say AWT or in the Spring framework or any other framework which has nothing to do with JavaFX?
I did not find any native observable collection API in Java/Kotlin. Is there a library/framework that contains observable collections and would separate them from JavaFX? I have tried looking them up, but I have only found RxJava, which has, from what I understood, nothing to do with the behaviour I want.
To sumarize my question: Is it considered clean using FXCollections in projects that have nothing in common with JavaFX. If not, is there a framework which would produce the same behaviours as observable collections?