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

Hi @Aryszin,

In Windows, the title bar can be customized using the Windows API in C#: Title bar customization - Windows apps | Microsoft Learn

You can access the java.awt.Frame instance like this and modify it’s shape for example (you can make it transparent here) :

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:

3 Likes