Universal Robots Forum

Script wrapping in Java Swing

Hello,

I am looking for an example of wrapping a script in Java swing. I have an example with HTML, but I am looking for one with Java swing.

Kind Regards,

Vineeth Panambur Venkatraman

What exactly do you mean by wrapping? Any script you want a URCap to execture can be written in the generateSript(ScriptWriter writer) method of an installation/program node using writer.appendline(scriptString)

Hi Sam,

In this example, Jacob gets the script files from root folder and wraps them in the program node. But this example is an HTML one. I would like to know if there is one with Swing.

Thanks,

It doesnt look like there is a swing version of this cap, however if you are familiar with writing URCaps, a lot of the methods will be reusable, in particular, the first method in the contribution class which reads the file into java from the filepath. You would then just need to implement a JFileChooser to have the user find the filepath.

Hi Sam,

Thanks for the reply. I will look into this.