TPaveText *pt = new TPaveText(0.2, 0.2, 0.8, 0.8, "NDC"); pt->AddText("This is a single line of text"); pt->Draw();
TPaveText *pt = new TPaveText(0.2, 0.2, 0.8, 0.8, "NDC"); pt->AddText("This is the first line"); pt->AddText("This is the second line"); pt->AddText("This is the third line"); pt->Draw();This code is similar to the first example, but it adds three lines of text to the box instead of one. Both examples use the TPaveText class, which is part of the ROOT package library.