there is a missing line feed in the generated juce code.
g.fillAll () after //[UserPrePaint] is commented.
//[UserPrePaint] Add your own custom painting code here.. //[/UserPrePaint] g.fillAll (Colours::white);
I simply added a “/n” in Jucer_JucerDocument to remove this problem.
code.getCallbackCode (String::empty, T("void"), T("paint (Graphics& g)"), false)
<< "//[UserPrePaint] Add your own custom painting code here..\n//[/UserPrePaint]\n";