From: Mico S. <mic...@ya...> - 2009-04-23 03:14:44
|
Hi all, I am new in jython and now I am learning to use Swing in jython. I followed first example in jython wiki: from javax.swing import JFrame f = JFrame('Hello, World!', defaultCloseOperation=JFrame.EXIT_ON_CLOSE, size=(300, 300), locationRelativeTo=None) f.show() but when I run it with jython2.5b3 got errors: Traceback (most recent call last): File "hello_jython.py", line 3, in <module> f = JFrame('Hello, World!', size = (300, 300), defaultCloseOperation = JFram e.EXIT_ON_CLOSE, locationRelativeTo = None) at org.python.core.PyNone.__tojava__(PyNone.java:34) at org.python.core.Py.tojava(Py.java:471) at org.python.core.PyBeanProperty._doset(PyBeanProperty.java:61) at org.python.core.PyObject.__set__(PyObject.java:3629) at org.python.core.PyObject.object___setattr__(PyObject.java:3689) at org.python.core.PyObject.object___setattr__(PyObject.java:3678) at org.python.core.PyObject$object___setattr___exposer.__call__(Unknown Source) at org.python.core.PyObjectDerived.__setattr__(PyObjectDerived.java:1026 ) java.lang.NullPointerException: java.lang.NullPointerException but it worked in jython2.2.1. I am using jre1.6.0. regards, MS |