Why does observableArrayList put square brackets around values ?
I can subsrting into them to get rid of them, BUT, it shouldn't be so.
Also, I have this error message when I tried to cast ObservableList<String> to String just so I can set the value.
Exception in thread "JavaFX Application Thread" java.lang.ClassCastException: com.sun.javafx.collections.ObservableListWrapper cannot be cast to javafx.beans.property.SimpleStringProperty
When overlaying my old Java codes with JavaFX, I found it necessary to use ObservableArrayList throughout all scenes to access the data retrieved from cloud, lke this:
The data coming back from the db are in JSON string which I can easily unpack. For example
userName = Arthur Chan
But when I access the ObservableList<String> userName from annother scene or class, it has square brackets around them, like this:
userName = [Arthur Chan]
I can get rid of the brackets, but I shouldn't have to b/c there's no reason why JavaFX should wrap in brackets..