I\'m trying to catch a mouse-click even on a Table
(which should cause a popup to be shown). The table is inside a ScrollPane
which is (in turn) in
OK - You have to listen to the correct thing:
class MyPanel extends GridBagPanel {
val gbc = new GridBagContraints( ... )
val table = new Table { ... }
add(new ScrollPane {
viewportView = table
}
}, gbc)
listenTo(table.Mouse.clicks) //THIS LINE IS IMPORTANT :-)
reactions += {
case MouseClicked(`table`, point, mod, clicks, pops) =>
println("Panel pops: " + pops)
}
}
}