Help with broken code
Rafael Bejarano <[email protected]> Wed, 17 Feb 2016 12:07:05 -0600
| Newsgroups | gmane.comp.lang.jython.user |
|---|---|
| Message-ID | <[email protected]> |
Hello,
The demo program below used to work, but now, when the button is clicked, nothing happens, although the window displaying the button does open just fine. I run it in the Macintosh Unix terminal. Any assistance with this problem would be greatly appreciated.
Rafael Bejarano
from javax.swing import JButton, JFrame
frame = JFrame('Hello, Jython!', defaultCloseOperation = JFrame.EXIT_ON_CLOSE, size = (300,300))
def change_text(event):
print "Clicked!"
button = JButton('Click Me!', actionPerformed=change_text)
frame.add(button)
frame.visible = True
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140