[Tutor] jython showMessageDialog question
Rob Andrews
rob@uselesspython.com
Mon, 20 May 2002 10:43:05 -0500
I just posted this question to the jython-users@lists.sourceforge.net
list, and I figured I'd drop it here as well. The problem I describe in
it is an example of trying to use Java swing components from the Jython
prompt. In some cases, I can use swing with jython to do GUI stuff with
great satisfaction, but it's a little mysterious on other occasions.
Please forgive the cheesiness of the following example. I was aiming for
brevity more than impressiveness.
I encounter errors along the following lines when I attempt to use
showMessageDialog in Jython. I have tried to attack the problem from a
number of different angles, and have about concluded that I must be
missing some simple, fundamental truth about how this works in Jython.
>>> import javax.swing as sshwing
>>> moreInput = sshwing.JOptionPane.showInputDialog("More input:")
>>> sshwing.JOptionPane.showMessageDialog( null, "Your input is
inadequate.")
Traceback (innermost last):
File "<console>", line 1, in ?
NameError: null
I will appreciate any illumination.
Rob Andrews