Printing to script editor "output panel" using a java method

Hi everyone,

I have a custom java package that I am testing using scripting in Fiji.
I was wondering if there is a way for java methods in this package to print some feedback to the script editor “output panel”.

The print methods in System.out actually print to the console window which is not automatically shown.
I can use IJ.log otherwise but since print statements of the scripting language are shown in the script editor panel I was wondering if the java methods could too.

Note: The java package would always be used within Fiji, so no worries if I have to rely on specific Fiji dependencies.

Thanks