This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

an applet as a module


The --applet flag doesn't work in kawa 1.6.94.

But modules work. A silly Hello World applet follows:

;; A test applet for Kawa-Scheme
(module-name 'testapp)
(module-extends <java.applet.Applet>)
(define (paint (g :: <java.awt.Graphics>)) <void>
      (invoke g 'drawString (as <java.lang.String> "Hello, World") (as 
<int> 50) (as <int> 50)))
(define (init) <void> (format #t "called init.~%~!"))
(define (start) <void> (format #t "called start.~%~!"))
(define (stop) <void> (format #t "called stop.~%~!"))
(define (destroy) <void> (format #t "called destroy.~%~!"))

Set up the above as "testapp.scm", compile it, create a "testapp.htm" file 
analogous to the "scribble.htm" file described in the Kawa manual, and it 
should work.

Toni
<arw@echonyc.com> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]