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

Is it possible to change how the bar looks in Windows, where the minimize, window & exit buttons are. Can you change the color of that?

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.setShape(new Ellipse2D.Double(0, 0, width, height));

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:

1 Like

it says “cannot find class or type named PSurfaceAWT” do you know a fix? ary

Hi @Aryszin,

add this on top…

import processing.awt.PSurfaceAWT;

— mnse