How to get maximize button working?

I’m trying to resize my app to full screen when the maximize button is pressed and don’t know where to start. Juce’s created GUI Application does not maximize either, it just gets the full screen but it’s window size is unchanged. I’ve tried adding maximiseButtonPressed to the MainWindow class, but it does not get called when maximised.

Any hints on how to get started?

OK, I see the first step is to set the main window resizable and my main window is getting a resize command. How does one get the new size to fit to?

I see that I can use getParentMonitorArea to get the resize area, but how do I detect that my resize callback is being called after a maximise event and not a normal app startup resize command?

There is no need to know if the a maximize or startup has caused the resize command. The dimensions of the window are normal for startup and large for maximize.