Is there a way a Java API or application to convert CSV tabular data as text and convert that into a PNG file with lines and a grid and header?
Right now, I am thinking xhtmlrenderer which converts HTML data into an image.
Updated: Andrew gave a good response, I set that as the answer. Also, I used xhtmlrenderer/flying saucer with the same result to convert a html document to an image. It took the same amount of effort as his example.
http://code.google.com/p/flying-saucer/
Now, on github:
https://github.com/berlinbrown/XHTMLRendererForHtmlDataToImage
Can you read the tabular data and put it into a
JTable?If so, call
table.paintComponent(Graphics)is a protected method – see insteadtable.paint(Graphics), where theGraphicsobject is obtained from an image that is the preferred size of the table.This example uses the Nimbus PLAF for the ‘alternate row shading’ which I think every table should have.