jython applet
Paul Clinch
pclinch at internet-glue.co.uk
Sat Nov 29 07:07:39 EST 2003
"jennifer haynes" <hanesjenny at verizon.net> wrote in message news:<jqMxb.27002$ZV6.19352 at nwrddc02.gnilink.net>...
> I can't Date() to print out in an applet
> this is what I have
>
> from java.util import Date
> from java import awt, applet
> from java.lang import String
>
> class Enhanced(applet.Applet):
> def paint(self, g):
> today = Date()
> g.drawString(today, 10, 30)
Indentation is import in python, it replaces block delimeters;
class Enhanced(applet.Applet):
def paint(self, g):
today = Date()
g.drawString(today, 10, 30)
>
>
>
> if __name__ == '__main__':
> import pawt
> pawt.test(Enhanced())
I helps if you report any error message as well.
More information about the Python-list
mailing list