I have a Java program which I'd like to call from a Jython program. I'd like to be able to have the two interface with one another and had hoped to call the Java program from Jython with an action listener as a parameter, but so far I have had no luck.
from java.awt.event import ActionListener
from java.awt.event import ActionEvent
from sg.gui import MainGui
ml = MyListener()
public MainGui(ActionListener listener)
top = new JFrame();
top.setBounds(300, 300, 600, 300);
JButton doneButton = new JButton("Done");
Is there some other way of doing this? If not, is there a better way to go about integrating Java and Python into a single application, or is that not a good thing to do?
以上就是Can I add a Jython action listener to a java program?的详细内容，更多请关注web前端其它相关文章！