Jython/Python and javax.swing.*

Sherrod Faulks birded at verizon.net
Mon Aug 23 12:34:51 EDT 2004


John,
Sorry I didn't reply earlier, but I found out how to do it in the 
Jython Doc. You must do:

from pawt import swing

Thanks for helping, though!

On 2004-08-23 07:03:12 -0400, crichton314 at btinternet.com (John Crichton) said:

> Sherrod Faulks <birded at verizon.net> wrote in message 
> news:<2004082212534416807%birded at verizonnet>...
>> I'm using Jython and in the python script I do:
>> 
>> from javax import swing
>> result = javax.swing.JOptionPane.showInputDialog(wC, cmd[8:],"Prompt 
>> from " + client.serverName, JOptionPane.PLAIN_MESSAGE)
>> 
>> wC is a JFrame, cmd is a String and client.serverName is a String.
>> It won't show the JOptionPane, why?
> 
> Hi Sherrod,
> 
> Having had a look at my last post after a nights sleep I'm not sure it
> was very clear...
> 
> If you change your script to the following it should work:
> 
> import javax.swing as swing
> result = swing.JOptionPane.showInputDialog(wC, cmd[8:],"Promptfrom " +
> client.serverName, swing.JOptionPane.PLAIN_MESSAGE)
> 
> Cheers,
> 
> John





More information about the Python-list mailing list