• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Calling method in Java App from Jython

 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If I create a GUI using a Jython script file, I am not clear on how we contruct the event methods so that the non GUI "work" part of the app is handled outside of the Jything Interpreter. Or is this even possible?
 
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm afraid that you have exceeded the monthly capacity of this forum, come back later.
Gregg, what do you mean by "outside" of the Jython interpreter? Do you
mean back in the JVM? Got code?
[ October 29, 2003: Message edited by: Barry Gaunt ]
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What I mean is if I use Jython to construct a simple GUI in a file. Then in my java code I do
interpreter.execfile("gui.py");
That is all find and good. But if my GUI has Buttons, Menu's, etc I need the Action Events to reside in the java program itself, not in the script file. I don't really have any code yet because I need to find out if this is possible before I commit to doing it.
But for an example I found on the internet:

If this is my script file that I call from the java program, notice the:

I need that to call a method inside my Java application. I don't want all my event code in the script file. I hope that makes better sense.
I'm afraid that you have exceeded the monthly capacity of this forum, come back later.
I noticed this forum was a bit on the dormant side. I thought I would bring it back to life.
 
The first person to drink cow's milk. That started off as a dare from this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic