How do you construct a shape button in main component?

I am trying to use shape buttons however because the class does not have a default constructor i need to construct it in the main component constructor. Normally i can manage this in my plugin processor and construct multiple different classes with no issue. However, i am unsure how to do this in a main component. (This is my first time building an app instead of a plugin)

This is what i am currently doing.

MainComponent::MainComponent() ,samplePad1("samplePad1", juce::Colours::red, juce::Colours::orange, juce::Colours::orangered)
{
    // Make sure you set the size of the component after
    // you add any child components.
    setSize (800, 600);

    // Some platforms require permissions to open input channels so request that here
    if (juce::RuntimePermissions::isRequired (juce::RuntimePermissions::recordAudio)
        && ! juce::RuntimePermissions::isGranted (juce::RuntimePermissions::recordAudio))
    {
        juce::RuntimePermissions::request (juce::RuntimePermissions::recordAudio,
                                           [&] (bool granted) { setAudioChannels (granted ? 2 : 0, 2); });
    }
    else
    {
        // Specify the number of input and output channels that we want to open
        setAudioChannels (2, 2);
    }

}

The constructor for the shape button is sample pad 1. Thanks for any assistance.

Also dropping the constructor inside of the brackets of the main component constructs gives the error “juce::ShapeButton” does not provide a call operator.

Just declare it as a member variable of MainComponent in your header file:

juce::ShapeButton samplePad1 { "samplePad1", juce::Colours::red, juce::Colours::orange, juce::Colours::orangered } ;

You need a :, not a ,.