I recently started using the G4P library and the GUI builder tool and they're working great. However I have encountered a problem with resizing elements in the GUI when the window gets resized. According to https://forum.processing.org/two/discussion/4212/g4p-button-resizing this isn't actually possible.
I have tried to bypass this by assigning a new modified object to the actSelect variable. Any performance hit is acceptable as this will only happen if the user resizes the window. However, I have not been able to use g4p_controls.GAbstractControl.dispose() or g4p_controls.GAbstractControl.markForDisposal() correctly, so eventually I get an OutOfMemory exception because lots of unused objects accumulate. Also, the new GUI element (in this case a droplist) doesn't always respond to user input.
//how do I use these?
//actSelect.markForDisposal();
//actSelect.dispose();
//actSelect = null;
actSelect = new GDropList(base, 10, 10, width/3.0-20, 220, 10);
actSelect.setItems(actData, 0);
actSelect.addEventHandler(base, "actSelectEvent");
How can I do this correctly?