Skip to content

Instantly share code, notes, and snippets.

@alcidesfp
Last active October 10, 2015 11:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alcidesfp/3682358 to your computer and use it in GitHub Desktop.
Save alcidesfp/3682358 to your computer and use it in GitHub Desktop.
Podcast Recursivo Ejemplo1: Scheme Kawa
;; -*- 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