==[[Jython Swing はじめに]]==
[[Jython]] | [[Python]] | [[Jython Swing]] | [[Swing]] |
# -*- coding:utf-8 -*-
from javax.swing import [[JFrame]], JButton, JLabel from java.awt.BorderLayout import NORTHNO[[R]]TH
def react(event):
message.text = "Thanks for pushing the button"
frame = [[JFrame]]("My First Swing GUI", size=(300,150))
button = JButton("Push Me", actionPerformed=react)
frame.add(button)
message = JLabel(" ")
frame.add(message, NORTHNO[[R]]TH) frame.visible [[vi]]sible = True
=====例=====
[[File:0751_jython_swing01.jpg]]