listenTo- publicly available method. Therefore, the easiest way to create them is as shown above, but add detail.listenTo(button)after you create the button:
val detail = new BoxPanel(Orientation.Vertical){ }
val seznam:BoxPanel = new BoxPanel(Orientation.Vertical){
val button = new Button("But"){
reactions += {
case ButtonClicked(_) =>
detail.contents.clear
detail.contents += new Label("Anystring")
}
}
detail.listenTo(button)
}
source
share