hi, i have this piece of code, i want to insert a text inside my shape. can anyone tell me how to proceed. thank you
posted 2 years ago
If you have a reference to the objects representing those Shapes, you can find the bounding rectangles for them all and find their coordinates easily. At the simplest you can use the drawString method of Graphics.
Ellipse2D is a rectangle; if you don't believe me look at its API documentation. It will have methods to find its coordinates.