Jython Swing はじめに
ナビゲーションに移動
検索に移動
Jython Swing はじめに
Jython | Python | Jython Swing | Swing |
ソース
- # -*- 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
例
© 2006 矢木浩人