Workflow - Juce and Design

One of the ongoing debates about doing GUI design in JUCE is whether or not to go the LookAndFeel route, or whether to subclass existing Components and override their paint() methods to customize the look of them that way. There are people who feel very strongly on both sides of that debate.

With the LookAndFeel approach, you have the benefit (like working with a CSS style sheet) of keeping the customized look of your app all in a central place. The downside is that it can get quite convoluted, remembering which LookAndFeel methods are being called, or untangling why the styles aren’t being applied as you would expect them to be.

For a one-off project, it might be simpler to go with subclassing Components and overriding paint().

If you do go the LookAndFeel route, this pair of helper functions I wrote might aid you. They provide a wrapper around one property of the NamedValueSet that each Component contains. Using setGuiClass in your Editor code allows you to tag a component with a class name, and then you can access that in the LookAndFeel class with getGuiClass, to style the Component appropriately.