Last active
October 10, 2015 11:18
-
-
Save alcidesfp/3682358 to your computer and use it in GitHub Desktop.
Podcast Recursivo Ejemplo1: Scheme Kawa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; -*- coding:utf-8; mode: Scheme -*- | |
(define-alias JFrame javax.swing.JFrame) | |
(define-alias Runnable java.lang.Runnable) | |
(define-alias EventQueue java.awt.EventQueue) | |
(define-simple-class MyApp (Runnable) | |
;; members | |
(main-wnd ::JFrame | |
init: (JFrame "Window Title" | |
default-close-operation: JFrame:EXIT_ON_CLOSE | |
||: (javax.swing.JLabel "Hello from Kawa"))) | |
;; methods | |
((run) ;; Implements Runnable interface | |
(main-wnd:setSize 640 480) | |
(main-wnd:pack) | |
(main-wnd:setVisible #t)) | |
((main args ::String[]) ::void allocation: 'static | |
(EventQueue:invokeLater (MyApp)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment