Text Editor Focus Problem

It seems JUCE gives focus to the first child that wants focus no matter where you click in a component. I created a custom component which consists of label and a textEditor. I add these components to a larger parent component. The problem is every time I click on the label part of the custom component the textEditor becomes focused. I want it such that the textEditor only takes focus if you click on it. If I click anywhere else in the component it should not focus. Thanks

No, it’s way more complicated and flexible than that! If you look at the Component class and search for “focus” you’ll find a ton of methods for customising what happens in many different ways.