Playing around and created a trivial application that puts an instance of MusicPane in a Viewport and displays it. MusicPane inherits from Component and calls setSize(1000, 1000) in its constructor. This code works as expected:
setSize (600, 400);
musicPane.setSize(1000, 1000); // why is this necessary?
The MusicPane shows up and everything works fine. What puzzles me is that if I fail to call musicPane.setSize() in MainComponent(), the Viewport doesn’t show anything at all; I just see the MainComponent. How is calling musicPane.setSize() here different from calling setSize() in MusicPane’s constructor?
(Juce 5.3, if it matters.)