Any java package to draw simple geometric shape?
问题 Does anyone have any suggestion about any lib/package to draw simple geometric, such as triangle, square? It can be saved into a png format. 回答1: You'll want to have a look at the Java 2D API: http://docs.oracle.com/javase/tutorial/2d/overview/index.html 回答2: This source uses Graphics2D of the Java 2D API to draw some simple colored shapes. For reference, here are the 32x32 images that result. import java.awt.*; import java.awt.geom.Ellipse2D; import java.awt.geom.GeneralPath; import java.awt