jython04.py
import java.lang
from java.awt import Frame,Button,TextArea from java.awt.event import ActionEvent class jython04(java.awt.Frame): def __init__(self): self.size=(208,276) self.myOutput=java.awt.TextArea("Hello UIQ from Jython!!!") self.theButton=java.awt.Button("Exit",actionPerformed=self.doExit) self.add("Center",self.myOutput) self.add("South",self.theButton) self.setVisible(1) def doExit(self,event): java.lang.System.exit(0) if __name__=="__main__": myApp=jython04() |
|
|