Example #1
0
    def run(self):
        if len(sys.argv) > 1:
            map_file = open(sys.argv[1], 'r')
        else:
            map_file = None
        frame = Frame()
        frame.setTitle('Babal')
        canvas = JGLBabalCanvas(320, 240, map_file)
        frame.add(canvas)
	frame.addWindowListener(CloseListener())
        frame.pack()
        frame.setVisible(1)
        canvas.start()
Example #2
0
from java.awt import Frame
from java.applet import Applet
from test185m import *

class test185a(Applet):
        def __init__(self):
                self.mydd = dd()
                self.add(self.mydd)


class foo:
	pass

class bar(foo):
	pass

if __name__ == "__main__":
        f = Frame(); c = c()
        f.add(c); f.pack(); f.show()

#


class TestButtonAction(ActionListener):
    def actionPerformed(self, e):
        textArea.append("Test Button Clicked!\n")


#
# Create the Frame, Panel, Button,
# TextArea, and TestButtonAction objects.
#

frame = Frame("Hello World")
panel = Panel()
button = Button("Test Button")
buttonAction = TestButtonAction()
textArea = TextArea()

#
# Put everything together and show
# the window.
#

button.addActionListener(buttonAction)
panel.add(button)
panel.add(textArea)
frame.add(panel)
frame.pack()
frame.show()
Example #4
0
from java.awt import Frame
from java.applet import Applet
from test185m import *


class test185a(Applet):
    def __init__(self):
        self.mydd = dd()
        self.add(self.mydd)


class foo:
    pass


class bar(foo):
    pass


if __name__ == "__main__":
    f = Frame()
    c = c()
    f.add(c)
    f.pack()
    f.show()

class TestButtonAction(ActionListener):
    def actionPerformed(self, e):
        textArea.append("Test Button Clicked!\n")


#
# Create the Frame, Panel, Button,
# TextArea, and TestButtonAction objects.
#

frame = Frame("Hello World")
panel = Panel()
button = Button("Test Button")
buttonAction = TestButtonAction()
textArea = TextArea()


#
# Put everything together and show
# the window.
#

button.addActionListener(buttonAction)
panel.add(button)
panel.add(textArea)
frame.add(panel)
frame.pack()
frame.show()