Panel formatting around output of groovy code

Hello,

The issue is that I have written groovy-code which outputs something :

{{groovy}}
//output here
{{/groovy}}

Now, I want the output to be formatted into a panel; as such, you would be now able to drag & drop this panel in the administration section of any xwiki - page.

Ás far as I know, this formatting is done in velocity by adding “#panelheader(…)” at the beginning, and “#panelfooter()” at the ending of the script.

But how do you do this in this case? Can you do the same in groovy?

I hope my question is atleast understandable to some extent.