- 追加された行はこのように表示されます。
- 削除された行は
このように表示されます。
!!!Jython Swing はじめに
[Jython][Python][Swing]
[Jython][Python][Jython Swing][Swing]
*[A Graphical User Interface with Jython and Swing(You Tube)|http://www.youtube.com/watch?gl=US&v=bqSQEG2Iphc]
::ソース
# -*- coding:utf-8 -*-
from javax.swing import JFrame, JButton, JLabel
from java.awt.BorderLayout import NORTH
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, NORTH)
frame.visible = True
::例
{{ref_image jython_swing01.jpg}}