Marc
Marc

Reputation: 385

How to draw a vector graphic on a JPanel

If I want to draw a normal bitmap image on a JPanel I simply call "graphics.drawImage(...)" in the panels "paint(Graphics graphics)" or "paintComponent(Graphics graphics)" method. How can I draw a vector graphic on a JPanel?

Regards

Upvotes: 2

Views: 4760

Answers (1)

gorjusborg
gorjusborg

Reputation: 656

Batik is an SVG library for Java. You should be able to use a JSVGCanvas to do what you want.

http://xmlgraphics.apache.org/batik/using/swing.html

Upvotes: 4

Related Questions