I’ve got a question that is a bit of a hassle to describe, but I’m gonna try.
I’ve build an application (using the awesome Quark’s G4P GUI buildertool). Got one “main”-window (Setting always on top enabled) and several “sub”-windows. When I use the app along with other apps running on windows it seems that when I want to use one of the “sub”-windows there’s no response on using buttons or anything on the “sub”-window. But, when I first click on the “main”-window” and then one a “sub”-window the buttons etc. respond? The code is exported as a executable.
Can someone point me in the right direction how I can avoid first activating the main-window before I can use the sub-windows?
I don’t think there is an exact solution to the problem because the sub windows are create and launched from the main applet.
If this was my application I would create the sub windows and make them invisible immediately. In the main sketch I would have a welcome screen with a button to “continue” which when clicked makes all the sub windows visible and therefore available
The following model may or may not work in your project depending on what you are trying to do. It uses the default Processing window with three (or more) JFrame windows with a single Swing button on each window, each with its own event handler. Therefore, button clicks are registered for each window independently. There is no event dispatch thread in this demo (which may not be mandatory in Processing). You’ll have to experiment. Draw() is non-functional on the main window, but can be fixed by repositioning the default canvas instead of removing it completely. The extra windows may be made visible or invisible as required or closed individually without terminating the main app.