Jason Shadle wrote:Hello all...first post. Tons of help great info on this site. Will be using frequently.
And a hearty welcome to the Ranch!
What class,method, or even formula, can I use to create a triangle on my applet? It's strange to me that there is a fillOval, fillRect, etc...But there is no fillTriangle, or drawTriangle?
Similarly, there's no drawPentagon, drawHexagon, drawHeptagon, drawOctagon, etc...
But if they did have some of these, where would they draw the line and have no more?
Check out the API entry for the Graphics class and you'll see many other useful methods including drawPolygon and fillPolygon. Also if you want to delve into Graphics2D, you'll likewise find some classes that implement Shape that you can use.