From: Bejarano, R. P. <be...@hs...> - 2016-02-18 16:28:27
|
Thank you for your prompt reply. I'll give your suggestions a try. Rafael ________________________________________ From: Stefan Richthofer [Ste...@gm...] Sent: Wednesday, February 17, 2016 2:52 PM To: Bejarano, Rafael P. Cc: jyt...@li... Subject: Re: [Jython-users] Help with broken code Hello Rafael, trying your program on linux, it works like expected. However, did you try to call frame.show()? (maybe instead of frame.visible = True) If this also fails, can you confirm that the equivalent Java-program would work? Given that it works on my setup, it is possible that on your system something with Java is broken rather than with Jython. In case you don't speak Java, try the trivial swing program: from javax.swing import JOptionPane JOptionPane.showInputDialog("Hello Jython"); in Java: public static class TestSwing { public static void main(String[] args) { javax.swing.JOptionPane.showInputDialog("Hello Jython"); } } If this works in Java, but not in Jython, I'd suggest to file an issue on bugs.jython.org. Also helpful: Did you apply some specific change that broke the program? Some update of Java or Jython, or some System update? Every information about what caused the breakage is helpful. Best Stefan > Gesendet: Mittwoch, 17. Februar 2016 um 19:07 Uhr > Von: "Rafael Bejarano" <be...@hs...> > An: jyt...@li... > Betreff: [Jython-users] Help with broken code > > 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 > _______________________________________________ > Jython-users mailing list > Jyt...@li... > https://lists.sourceforge.net/lists/listinfo/jython-users > |