Using prolog at an Applet
I want to use prolog to built an expert system that has an applet GUI.
I use JPL (JPL A Java Interface to Prolog) as a java interface to prolog.
The applet initializes the prolog engine. Then prolog ask questions to the user in order to find a solution. The questions must appear back in the applet.
Prolog can communicate with Java by creating a class (e.g. jpl_new('myclass', , F) ) and then call its methods (e.g. jpl_call( F, showMenu, [parameters], returnedValue)). What I want to do is the prolog to present the questions in the applet, but I do not know how to reference the applet. I tried to create another class from prolog (e.g. classCreatedFromProlog.java) and from this class to call the applet but it failed :(.
The problem is that I cannot reference the applet from an external class.
Do you have any sugestions?