class RenderThread extends Thread {
public void run() {
renderer.setDoubleBuffered(true);
for (int i=0; i<files.length; i++) {
GraphicsNode gvtRoot = null;
GVTBuilder builder = new GVTBuilder();
try {
System.out.println("Reading: " + files[i]);
Document svgDoc = loader.loadDocument
(files[i].toURL().toString());
System.out.println("Building: " + files[i]);
gvtRoot = builder.build(ctx, svgDoc);
System.out.println("Rendering: " + files[i]);
renderer.setTree(gvtRoot);
Element elt = ((SVGDocument)svgDoc).getRootElement();
renderer.setTransform