0

Backend:
I have an observable collection of strings:

val list = new ObservableBuffer[String]

UI:
And I want to put this list after title in VBox:

new VBox {
  children = Seq(
    new Label("My awesome title"),
    list    //Doesn't work
  )
} 

How to make this work?

Oleg
  • 899
  • 1
  • 8
  • 22

1 Answers1

0

Solved with:

new VBox {
  children = Seq(
    new Label("My awesome title"),
    new StackPane{
      children = new ListView[String] {
        items = list
      }
    }
  )
} 

Is there better solution?

Oleg
  • 899
  • 1
  • 8
  • 22