3

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.

Community
  • 1
  • 1

1 Answers1

3

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.

DG2
  • 106
  • 5