# Possible to change top bars layout? (window frame color)

**URL:** <https://discourse.processing.org/t/possible-to-change-top-bars-layout-window-frame-color/40914>\
**Category:** Coding Questions\
**Created:** [February 13, 2023, 4:49pm UTC](https://discourse.processing.org/t/possible-to-change-top-bars-layout-window-frame-color/40914 "2023-02-13T16:49:47Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [February 17, 2023, 1:26pm UTC](https://discourse.processing.org/t/possible-to-change-top-bars-layout-window-frame-color/40914/2 "2023-02-17T13:26:38Z")

</div>

Hi @Aryszin,

In Windows, the title bar can be customized using the Windows API in C#: [Title bar customization - Windows apps | Microsoft Learn](https://learn.microsoft.com/en-us/windows/apps/develop/title-bar?tabs=wasdk)

You can access the [`java.awt.Frame`](https://docs.oracle.com/javase/7/docs/api/java/awt/Frame.html) instance like this and modify it’s shape for example (you can make it transparent [here](https://docs.oracle.com/javase/tutorial/displayCode.html?code=https://docs.oracle.com/javase/tutorial/uiswing/examples/misc/ShapedWindowDemoProject/src/misc/ShapedWindowDemo.java)) :

```processing
import processing.awt.PSurfaceAWT;
import java.awt.Frame;
import java.awt.geom.Ellipse2D;

void setup() {
  size(500, 500);
  
  PSurfaceAWT.SmoothCanvas canvas = (PSurfaceAWT.SmoothCanvas)(surface.getNative());
  Frame frame = canvas.getFrame();
  
  frame.removeNotify();
  frame.setUndecorated(true);
  frame.setShape(new Ellipse2D.Double(0, 0, width, height));
  frame.addNotify();
}

```

But I don’t know if the Java API can access and modify the style of the title bar. You might want to investigate more:

> <https://stackoverflow.com/questions/2482971/how-to-change-the-color-of-titlebar-in-jframe>

> <https://stackoverflow.com/questions/7553146/java-awt-remove-frame-title-bar-and-add-customised-title-bar>

---

_[View the full topic](https://discourse.processing.org/t/possible-to-change-top-bars-layout-window-frame-color/40914)._
