import org.apache.batik.swing.JSVGCanvas;
import java.io.File;
import javax.swing.JFrame;

public class CanvasExample {

    public static void main(String[] args) {
        // A canvas to show "squiggle.svg"
        JSVGCanvas c = new JSVGCanvas();
        String uri = new File("squiggle.svg").toURI().toString();
        c.setURI(uri);

        // A frame for the canvas to live in
        JFrame f = new JFrame(uri);
        f.setSize(600, 300);
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        // Add the canvas to the frame
        f.getContentPane().add(c);

        // Show the frame
        f.setVisible(true);
    }
}

