I’m new to Juce. I am trying to simply add a yellow box to a component but having no luck. Can anyone tell me why the following doesn’t display the box:
Probably because you’ve not set the bounds of the composite object. But TBH if you’re just starting, why not just try drawing your rectangle in the paint() method? That’s much easier than messing around with Drawables, which can be a PITA. I rarely use them myself.
BTW your code looks extremely leaky. If you don’t really understand memory management in C++, please stop whatever you’re doing and go and learn about it before attempting to write any more code!