i tried to run a python script using Jython,
from javax.swing import JButton,JFrame
def action():
execfile(r"E:\stack.py")
frame = JFrame("window")
button = JButton("button", actionPerformed = action)
frame.add(button)
frame.show()
But it's showing error:
Exception in thread "AWT-EventQueue-0" TypeError: action() takes no arguments (1 given)
Here i'm not passing any arguments to action function!
where am i going wrong?
Thank you