# PApplet second win exit, create ... RAM overfill

**URL:** <https://discourse.processing.org/t/papplet-second-win-exit-create-ram-overfill/16090>\
**Category:** Coding Questions\
**Created:** [December 3, 2019, 8:35pm UTC](https://discourse.processing.org/t/papplet-second-win-exit-create-ram-overfill/16090 "2019-12-03T20:35:28Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Lexyth](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/lexyth/32/7403_2.png) [@Lexyth](https://discourse.processing.org/u/Lexyth)\
**Post date:** [December 4, 2019, 4:08am UTC](https://discourse.processing.org/t/papplet-second-win-exit-create-ram-overfill/16090/2 "2019-12-04T04:08:39Z")

</div>

That‘s even pretty much the same Code :

> [@Closing a second window](https://discourse.processing.org/t/closing-a-second-window/381):
>
> I want to be able to create a second window. The problem is I want the user to be able to close the second window, but doing so closes both the second and main frame. Is there a way I can prevent this? PWindow win; public void settings() { size(320, 240); } void setup() { win = new PWindow(); } void draw() { background(255, 0, 0); fill(255); rect(10, 10, frameCount, 10); } void mousePressed() { println("mousePressed in primary window"); } class PWindow extends PApplet { PWi…

---

_[View the full topic](https://discourse.processing.org/t/papplet-second-win-exit-create-ram-overfill/16090)._
