Making a program without a window border

ok, I was wondering if there a way to make a program using processing let say I’m making a stick figure, but I want the figure to appear on my screen instead of in the display box.
what usually happens

what i want to happen

yes i messed up with the pics but you should get the idea

1 Like

You can try fullScreen() with the surface settings, if you want a transparent background, im not sure if its possible, cant quite remember

void setup(){
  fullScreen();
  surface.setSize(300,300);
  surface.setLocation(displayWidth/2-(width/2),displayHeight/2-(height/2));
}

void draw(){
  background(0);
}

If I use fullScreen then I need to be able to view my screen I want the program to appear on my screen

Yeah, thats why you use surface.setSize() makes it full screen then shrinks it down, try my code example

I tried your code and got black box on my screen i want the stick figure to show up with no background just the stick figure.

I thought you just wanted the screen without a border, all I used was a background of black hence the black box, as I said, im not sure if transparent backgrounds are a thing anymore, pretty sure they used to be in older versions, maybe using JFrame or something more advanced

I want to create a program that looks like the character is actually on your screen. No background no boaders.

All my code does is remove the border, hope someone can help with the background

Thanks I’ll make something to give better example. I’m pretty sure i’m not clear enough.
Here is a better example. I totally forgot why I started this lol.
You can see the stick figure aka the program is moving but you dont see boarders or background. I was thinking using fullscreen then somehow get the screen every frame, but is there an easier way.

Hi @ctremblay,

you can also do it like this by set undecorated and apply any shape for the frame …
(for simplicity just used a round rectangle)

Cheers
— mnse

import javax.swing.*;
import processing.awt.*;
import java.awt.geom.*;

JFrame frame;

void setup() {
  size(400,400);
  frame=(JFrame) ((PSurfaceAWT.SmoothCanvas)getSurface().getNative()).getFrame();  
  frame.dispose();
  frame.setUndecorated(true);
  frame.setShape(new RoundRectangle2D.Double(0, 0, width, height, 50, 50));
  frame.setVisible(true);
  textSize(50);
  textAlign(CENTER);
}

void draw() {
  background(255,0,255);
  fill(0,0,255);
  text("Hello World!",width/2,height/2);    
}

dummyframe

a bit more complex your window could also look like this … :slight_smile:

PS: any shape mentioned above implied also your sticky man …