# Using an SVG image in a custom module

**URL:** <https://forum.inductiveautomation.com/t/using-an-svg-image-in-a-custom-module/76789>\
**Category:** Module Development\
**Tags:** vision\
**Created:** [July 24, 2023, 3:12pm UTC](https://forum.inductiveautomation.com/t/using-an-svg-image-in-a-custom-module/76789 "2023-07-24T15:12:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Asjal\_Ahmad](https://avatars.discourse-cdn.com/v4/letter/a/9e8a1a/32.png) [@Asjal\_Ahmad](https://forum.inductiveautomation.com/u/Asjal_Ahmad)\
**Post date:** [July 24, 2023, 3:12pm UTC](https://forum.inductiveautomation.com/t/using-an-svg-image-in-a-custom-module/76789/1 "2023-07-24T15:12:17Z")

</div>

I am quite new to Java Swing and still learning the ropes. I want to create a component for Vision that looks like this (Polygon + circle + rectangle + Level Indicator).  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/6/f6c994c56e0971a9f4b08841e71577103e77e74a.png)

I think the best way to do this would be to use an SVG for the shapes and then a simple JPanel with a FlowLayout for the Level Indicator. My question is, how can I use SVG images with other Swing Components. I noticed IntelliJ has a Swing UI designer, but it doesn't let me put SVG images into the window.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [July 24, 2023, 3:21pm UTC](https://forum.inductiveautomation.com/t/using-an-svg-image-in-a-custom-module/76789/2 "2023-07-24T15:21:47Z")

</div>

Do you actually need the full capabilities of SVG embedding? Or is this simple shape all you need? If so, I would just use the builtin 2d graphics primitives in one component, and embed the PMILevelIndicator 'next' to it.

> **[Drawing Geometric Primitives (The Java™ Tutorials \>        
            2D...](https://docs.oracle.com/javase/tutorial/2d/geometry/primitives.html)**
>
> Java Tutorials lesson shows how to use the Graphics2D class to draw graphic primitives, arbitrary shapes, and to display graphics with outline and fill styles
