fork download
  1. object MouseTest extends SimpleSwingApplication {
  2. override lazy val top = new MainFrame {
  3. top =>
  4.  
  5. title = "Window Title"
  6. minimumSize = new Dimension( 300, 300 )
  7. location = new Point(500,500)
  8.  
  9. contents = new BoxPanel( Orientation.Vertical ) {
  10. contents += new Label("TEXT") {
  11. listenTo(this.mouse.clicks)
  12. reactions += {
  13. case MouseClicked(source, point, modifiers, clicks, triggersPopup) => {
  14. var los = top.locationOnScreen
  15. println(los)
  16. }
  17. }
  18. }
  19. }
  20. }
  21. }
  22.  
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty