Subj : Re: JS to display on Java Swing component To : netscape.public.mozilla.jseng From : JabberW Date : Mon Dec 13 2004 01:03 am arr24 wrote: > Dear all, > > Newbie question, > > Would anyone know where I could obtain a code fragment showing how JS code > (for example to write a string onto a Document) can be actioned so that it > writes to a java swing component, eg JEditorPane? > > I understand that the JEditorPane in the javax.swing package can use Rhino > to interpret Javascript and display the results in the JEditorPane. I'm > somewhat stuck as to how to get started. I've tried the FAQ at > www.mozilla.org/rhino and the documentation but I'm struggling to find a > starting point. > > From the examples on the rhino home page, I can see how to get a java > program to action a JS statement, my problem is how to get that statement eg > document.write("hello world") to output to JEditorPane. > > Any help would be very much appreciated. > > Rob .