# Automatically change size() to fullScreen()

**URL:** <https://discourse.processing.org/t/automatically-change-size-to-fullscreen/14103>\
**Category:** Development\
**Created:** [September 22, 2019, 1:34am UTC](https://discourse.processing.org/t/automatically-change-size-to-fullscreen/14103 "2019-09-22T01:34:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jvolker](https://avatars.discourse-cdn.com/v4/letter/j/f0a364/32.png) [@jvolker](https://discourse.processing.org/u/jvolker)\
**Post date:** [September 22, 2019, 1:34am UTC](https://discourse.processing.org/t/automatically-change-size-to-fullscreen/14103/1 "2019-09-22T01:34:11Z")

</div>

I’m looking for a preprocessor for Processing code that reliably changes size() calls into fullScreen() calls preserving the passed renderer.

Does anyone know of a related project? Thanks.

I would like to this to [improve the Openframe-Processing extension](https://github.com/jvolker/Openframe-Processing) as described [here](https://discourse.processing.org/t/how-to-distribute-sketches-with-libraries-to-openframe/14095) earlier.

---

<div class="post-metadata">

**Author:** ![micycle](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/micycle/32/201_2.png) [@micycle](https://discourse.processing.org/u/micycle)\
**Post date:** [September 22, 2019, 9:13pm UTC](https://discourse.processing.org/t/automatically-change-size-to-fullscreen/14103/2 "2019-09-22T21:13:56Z")

</div>

Does this answer your question?

```auto
	@Override
	public void size(int width, int height) {
		fullScreen();
	}
	
	@Override
	public void size(int width, int height, String renderer) {
		fullScreen();
	}

```

---

<div class="post-metadata">

**Author:** ![jvolker](https://avatars.discourse-cdn.com/v4/letter/j/f0a364/32.png) [@jvolker](https://discourse.processing.org/u/jvolker)\
**Post date:** [September 23, 2019, 12:33am UTC](https://discourse.processing.org/t/automatically-change-size-to-fullscreen/14103/3 "2019-09-23T00:33:49Z")

</div>

Thanks @micycle! That’s awesome. I will add it to the Processing code instead of replacing the size() calls with regex in the code.

I just slightly modified it to preserve the renderer:

```auto
  @Override
  public void size(int width, int height) {
    fullScreen();
  }
  
  @Override
  public void size(int width, int height, String renderer) {
    fullScreen(renderer);
  }

```
