Apache Commons has a Batik Swing component containing a special JSVGCanvas canvas. This is the best approach you can find.
The goal of the Batik Swing component is to provide a Swing component that can be used to display SVG documents . With the JSVGCanvas class JSVGCanvas you can easily display an SVG document (from a URI or DOM tree) and allow the user to manipulate it, for example, rotate, scale, pan, select text or activate hyperlinks.
I tried using Apache Batik without a positive result
Any problem you can share with us? Here and here you will find how to implement it.
public SVGCanvasDemo(JFrame frame) { frame.getContentPane().setLayout(new BorderLayout()); frame.getContentPane().add("Center", svgCanvas); frame.setVisible(true); svgCanvas.setURI("file:/c:/files/hungryminds/rectangles.svg"); }
source share