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
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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