How to close one window without closing the entire program?

Hey guys! I was wondering if i could get some help. I am trying to setup a program of mine that has two windows. the problem is that when one window is closed, it kills the whole program. I am using the FX2D Renderer, here is my code:

Window 2:

import processing.core.*;

public class AssetManager extends PApplet {

    public void run() {
        PApplet.main(new String[] {"AssetManager"});
    }

    public ArrayList<File> assets;  
    public String[] assetThumbs;    
    public String[] fontList = PFont.list();


    public void settings() {
        size(600,400,FX2D);
    }

    public void setup() {

    }

    public void draw() {

    }

Main Program (includes the void main) and Window one:

Basically the same, just declares the class constructor and launches the secondary window using void run. This works totally fine for running two windows from one program, I just need to figure out how to set up the individual closing/exit setup.

Thank you!!!!

Answers

Sign In or Register to comment.