I got another weird error trying out the examples from the scalafx-repo. This time I copied the whole file. But I still got the following error:
Error:(26, 11) type mismatch;
found : scalafx.scene.control.TableColumn[hello.Person,String]
required: javafx.scene.control.TableColumn[hello.Person, ?]
new TableColumn[Person, String] {
^
I wonder why this ScalaFX object requires a JavaFX object. The approach was like this. I cloned the hello-world from the scalafx-repository.
The problem is that the implicit conversion from ScalaFX's TableColumn to JavaFX's TableColumn is not in scope. Add
import TableColumn._ to your list of imports and you should be fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With