import scala.
swing.
event.
MouseClicked
title = "Window Title"
minimumSize
= new Dimension
( 300,
300 ) location
= new Point
(500,
500)
contents
= new BoxPanel
( Orientation.
Vertical ) { contents +
= new Label
("TEXT") { listenTo
(this.
mouse.
clicks) reactions += {
case MouseClicked
(source, point, modifiers, clicks, triggersPopup
) => { var los
= top.
locationOnScreen println(los)
}
}
}
}
}
}
aW1wb3J0IHNjYWxhLnN3aW5nLl8KaW1wb3J0IHNjYWxhLnN3aW5nLmV2ZW50Lk1vdXNlQ2xpY2tlZAppbXBvcnQgamF2YS5hd3QuUG9pbnQKCm9iamVjdCBNb3VzZVRlc3QgZXh0ZW5kcyBTaW1wbGVTd2luZ0FwcGxpY2F0aW9uIHsKICAgIGRlZiB0b3AgPSBuZXcgTWFpbkZyYW1lIHsKICAgICAgICB0aXRsZSA9ICJXaW5kb3cgVGl0bGUiCiAgICAgICAgbWluaW11bVNpemUgPSBuZXcgRGltZW5zaW9uKCAzMDAsIDMwMCApCiAgICAgICAgbG9jYXRpb24gPSBuZXcgUG9pbnQoNTAwLDUwMCkKCiAgICAgICAgY29udGVudHMgPSBuZXcgQm94UGFuZWwoIE9yaWVudGF0aW9uLlZlcnRpY2FsICkgewogICAgICAgICAgICBjb250ZW50cyArPSBuZXcgTGFiZWwoIlRFWFQiKSB7CiAgICAgICAgICAgICAgICBsaXN0ZW5Ubyh0aGlzLm1vdXNlLmNsaWNrcykKICAgICAgICAgICAgICAgIHJlYWN0aW9ucyArPSB7CiAgICAgICAgICAgICAgICAgICAgY2FzZSBNb3VzZUNsaWNrZWQoc291cmNlLCBwb2ludCwgbW9kaWZpZXJzLCBjbGlja3MsIHRyaWdnZXJzUG9wdXApID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGxvcyA9IHRvcC5sb2NhdGlvbk9uU2NyZWVuCiAgICAgICAgICAgICAgICAgICAgICAgICBwcmludGxuKGxvcykKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgIH0KICAgICAgICB9CiAgICB9Cn0=