6

I am using Processing to learn programming and wondered if there is a way to make an OS window grow, shrink, make it transparent or give it round edges. As far as I know Processing uses Java's Frame class and not the JFrame class, but I just can't figure out how to do this.

Thanks for your help.

For reference, similar question asked at Re: Forcing a window to stay in front of all other - Reply #3

CodeMouse92
  • 6,840
  • 14
  • 73
  • 130

1 Answers1

9

For resizing the window simply use the following command in your draw() method:

frame.setSize(x,y);

Make sure you define the frame as resizable in your setup() method:

frame.setResizable(true);

Using plain vanilla processing you can't change other window attribute as they are part of the frame the framework draws for you. I suppose if you hack processing a bit in a regular IDE, such as eclipse, you could somehow override this behavior and draw a window/frame of your own.

Yuval Adam
  • 161,610
  • 92
  • 305
  • 395
  • works awesome. Haven't been playing with these attributes but always was wondering if it's possible to change alter them :) – Alex Cio Aug 09 '22 at 22:59