Can someone suggest me a library for svg for java or some sample code to display svg files? I am noob, so please help.
You can use Apache Batik . I downloaded it a while ago, and it had some examples when displaying SVG. To display SVG in the Swing component, you can follow this example .