Geertjan's Blog

  • April 2, 2009

Improved Output Window APIs

Geertjan Wielenga
Product Manager
There are several new classes that relate to the Output window, resulting in cool enhancements, such as the Output window in Test Runner.

New classes include IOColorLines, IOColors, and IOContainer.

Here's IOColorLines:

try {
InputOutput io = IOProvider.getDefault().getIO("Colorful Output", null);
IOColorLines.println(io, "Hello....", Color.GREEN);
IOColorLines.println(io, "how....", Color.RED);
IOColorLines.println(io, "are....", Color.BLUE);
IOColorLines.println(io, "you...?", Color.MAGENTA);
} catch (IOException ex) {
Logger.getLogger(DemoActionListener.class.getName()).log(Level.SEVERE, null, ex);

The above results in:

Join the discussion

Comments ( 3 )
  • Aljoscha Rittner Thursday, April 2, 2009


    Ok, let us start ANSI Colored Console games ;-)

    But it is a nice enhancement for NetBeans Platform Server Applications.

    bg, josh.

  • Tiho Lupak Friday, April 3, 2009

    I'm curious what are the dependencies of this colored output window (in terms of NB platform size/module number).

    Some applications that use the standard output could use this colored output window instead if the dependencies were not too huge, and the API would be very simple to apply.

  • Dmitry Friday, August 26, 2011

    Hi Geertjan!

    Could you tell me please, is there an ability to change font in a custom output window?

Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.