>>> Let's run Python on Mobile

วันจันทร์, มกราคม 22, 2550

jython01.py

import java.lang
from java.awt import Frame,Label,Button
from java.awt.event import ActionEvent
class jython01(java.awt.Frame):
def __init__(self):
self.size=(208,276)
self.theLabel=java.awt.Label("Hello",java.awt.Label.CENTER)
self.theButton=java.awt.Button("Exit",actionPerformed=self.doExit)
self.add("Center",self.theLabel)
self.add("South",self.theButton)
self.setVisible(1)
def doExit(self,event):
java.lang.System.exit(0)
if __name__=="__main__":
a=jython01()


Jython on PC


Jython on UIQ