# How to make transparent windows in processing.py

**URL:** <https://discourse.processing.org/t/how-to-make-transparent-windows-in-processing-py/38727>\
**Category:** Processing.py\
**Created:** [September 13, 2022, 12:58am UTC](https://discourse.processing.org/t/how-to-make-transparent-windows-in-processing-py/38727 "2022-09-13T00:58:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Boxit379](https://avatars.discourse-cdn.com/v4/letter/b/e47774/32.png) [@Boxit379](https://discourse.processing.org/u/Boxit379)\
**Post date:** [September 13, 2022, 12:58am UTC](https://discourse.processing.org/t/how-to-make-transparent-windows-in-processing-py/38727/1 "2022-09-13T00:58:36Z")

</div>

Hi!  
I’ve been learning to code in Processing.py and was wondering if it’s possible to make a window completely transparent in the python version of processing. I’ve seen a few similar posts such as [this one](https://discourse.processing.org/t/transparent-translucent-window-drawing-graphics-on-desktop-how-to-capture-mouse-and-keyboard/1390) but they all use JFrame which is only for java.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![josephh](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/josephh/32/210_2.png) [@josephh](https://discourse.processing.org/u/josephh)\
**Post date:** [September 16, 2022, 12:41pm UTC](https://discourse.processing.org/t/how-to-make-transparent-windows-in-processing-py/38727/2 "2022-09-16T12:41:16Z")

</div>

Hi @Boxit379,

Welcome to the forum! 😉

Take a look at this Processing.py documentation page:

> **[Processing.py on the command line \\ Tutorials](https://py.processing.org/tutorials/command-line/#other-java-libraries)**
>
> Python Mode for Processing extends the Processing Development Environment with the Python programming language.

Since Processing.py uses Jython, you should have similar APIs and function names:

With a little bit of exploration I came up with this code:

```python
from javax.swing import JFrame
from com.sun.awt import AWTUtilities

def setup():
    size(500, 500)
    
    frame = this.surface.getNative().getFrame()

    frame.removeNotify()
    frame.setUndecorated(True)
    AWTUtilities.setWindowOpacity(frame, 0.5)
    frame.addNotify()
    
def draw():
    background(255, 0, 0)
    circle(width / 2, height / 2, width)
    noLoop()

```

the whole window is transparent and has a little border bug thought 😉
