# Add ellipse annotation The page describes how to add ellipse annotation to a document using GroupDocs.Annotation for Java. Ellipse annotation draws elliptic annotation on a document page as shown in the picture below. ![](https://docs.groupdocs.com/annotation/java/images/add-ellipse-annotation.png) You can use the following methods to set the properties of the [EllipseAnnotation](https://reference.groupdocs.com/annotation/java/com.groupdocs.annotation.models.annotationmodels/ellipseannotation) class:  * [setBackgroundColor()](https://reference.groupdocs.com/annotation/java/com.groupdocs.annotation.models.annotationmodels/ellipseannotation/#setBackgroundColor-java.lang.Integer-) defines the ellipse background color * [setBox()](https://reference.groupdocs.com/annotation/java/com.groupdocs.annotation.models.annotationmodels/ellipseannotation/#setBox-com.groupdocs.annotation.models.Rectangle-) defines the annotation position on the page; * [setOpacity()](https://reference.groupdocs.com/annotation/java/com.groupdocs.annotation.models.annotationmodels/ellipseannotation/#setOpacity-java.lang.Double-) allows you to set the annotation opacity * [setPenColor()](https://reference.groupdocs.com/annotation/java/com.groupdocs.annotation.models.annotationmodels/ellipseannotation/#setPenColor-java.lang.Integer-) defines the pen color * [setPenStyle()](https://reference.groupdocs.com/annotation/java/com.groupdocs.annotation.models.annotationmodels/ellipseannotation/#setPenStyle-java.lang.Byte-) - defines the line style (solid, dash, dot etc.) * [setPenWidth()](https://reference.groupdocs.com/annotation/java/com.groupdocs.annotation.models.annotationmodels/ellipseannotation/#setPenWidth-java.lang.Byte-) defines the line width in pixels.  To add an ellipse annotation, follow these steps: 1. Instantiate the [Annotator](https://reference.groupdocs.com/java/annotation/com.groupdocs.annotation/Annotator) class. Specify the input document path or stream. 2. Instantiate [EllipseAnnotation](https://reference.groupdocs.com/annotation/java/com.groupdocs.annotation.models.annotationmodels/ellipseannotation) class. Specify the appropriate properties (position, page number, etc). 3. Call the [add()](https://reference.groupdocs.com/annotation/java/com.groupdocs.annotation/annotator/#add-com.groupdocs.annotation.models.annotationmodels.AnnotationBase-) method. Specify the [EllipseAnnotation](https://reference.groupdocs.com/annotation/java/com.groupdocs.annotation.models.annotationmodels/ellipseannotation) class. 4. Call the [save()](https://reference.groupdocs.com/annotation/java/com.groupdocs.annotation/annotator/#save--) method. Specify the output document path or stream. The following code snippet shows how to add [EllipseAnnotation](https://reference.groupdocs.com/annotation/java/com.groupdocs.annotation.models.annotationmodels/ellipseannotation) to the document: {{< tabs "example1">}} {{< tab "Java" >}} ```java // This example demonstrates adding ellipse annotation. // Create an instance of Annotator class Annotator annotator = new Annotator("inputPath"); try { // Create an instance of Reply class and add comments Reply reply1 = new Reply(); reply1.setComment("First comment"); reply1.setRepliedOn(Calendar.getInstance().getTime()); Reply reply2 = new Reply(); reply2.setComment("Second comment"); reply2.setRepliedOn(Calendar.getInstance().getTime()); java.util.List replies = new ArrayList(); replies.add(reply1); replies.add(reply2); // Create an instance of EllipseAnnotation class and set options EllipseAnnotation ellipse = new EllipseAnnotation(); ellipse.setBackgroundColor(65535); ellipse.setBox(new Rectangle(100, 100, 100, 100)); ellipse.setCreatedOn(Calendar.getInstance().getTime()); ellipse.setMessage("This is ellipse annotation"); ellipse.setOpacity(0.7); ellipse.setPageNumber(0); ellipse.setPenColor(65535); ellipse.setPenStyle(PenStyle.Dot); ellipse.setPenWidth((byte) 3); ellipse.setReplies(replies); // Add annotation and save to file annotator.add(ellipse); annotator.save("outputPath"); } finally { if (annotator != null) { annotator.dispose(); } } ``` {{< /tab >}} {{< /tabs >}}