Download NetBeans!

20090402 Thursday April 02, 2009

Improved Output Window APIs

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:

Apr 02 2009, 01:10:06 PM PDT Permalink

Trackback URL: http://blogs.sun.com/geertjan/entry/improved_output_window_apis
Comments:

Hi!

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

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

bg, josh.

Posted by Aljoscha Rittner on April 02, 2009 at 11:31 PM PDT #

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.

Posted by Tiho Lupak on April 03, 2009 at 02:49 AM PDT #

Post a Comment:

Name:
E-Mail:
URL:

Your Comment:

HTML Syntax: NOT allowed