On Jun 18, 10:52 pm, OMouse <[EMAIL PROTECTED]> wrote:
> On Jun 11, 5:15 pm, europe72 <[EMAIL PROTECTED]> wrote:
>
> > I understand that javax.swingis available/accessible thru Packages
> > etc., and can be scripted, but is anyone on this list aware of any
> > examples, online resources or other documentation to this effect?
>
> > Thanks in advance
>
> There's one example here:http://www.mozilla.org/rhino/scriptjava.html
>
> I installed Rhino last night and have been messing around with it a
> bit today. This is as far as I've gotten:
>
>     importPackage(javax.swing);
>     main_win = new JFrame("My window");
>     with (main_win) {
>         defaultCloseOperation = JFrame.EXIT_ON_CLOSE;
>         setSize(640, 480);
>         add(new JLabel("Hello!"));
>         visible = true;
>     }
>
> So it's basically the same as regular Java, except for that sweet
> sweet with expression :-)
> -Rudolf

BTW...there is a very nice example of scripting Swing included with
the distro. So if anyone else is looking for some examples as I was,
look no further than rhino1_6R7
/examples/SwingApplication.js
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to