I\'m creating an output in Java using printf() to create table headers. One of the columns needs variable width.
Basically it should look like this:
Use StringUtils.center from the Commons Lang library:
StringUtils.center(column, "Column Heading".length());