Jython Applets

Greg Krohn volucris at hotmail.com
Wed Oct 3 22:12:41 CEST 2001

I am having problems compiling a test jython applet. This is
my code:

## BEGIN C:\Projects\JyApp\JyApp.py

import java

class JyApp(java.applet.Applet):
    def paint(self, g):
        g.setFont(java.awt.Font("Arial", 0, 80))
        g.drawString('Hello', 0, 0)

## END C:\Projects\JyApp\JyApp.py

## BEGIN C:\Projects\JyApp\jpywork\JyApp.html

<APPLET code='JyApp.class'></APPLET>

## END C:\Projects\JyApp\jpywork\JyApp.html

I use '-d' with jythonc and I get a bunch of deprecation
warnings, but it compiles fine. When I view JyApp.html in
IE5.5 it just shows the empty gray applet box, and it says
'load: class JyApp not found' in the status bar. JyApp.class
IS in the same folder as JyApp.html (...\JyApp\jpywork\).
Any ideas? Are there any good Jython docs out there (besides
the ones in the Jython distro)?



Volucris (a) hotmail.com
"Eu não falo uma única palavra do português."

More information about the Python-list mailing list