Welcome to TableFormatter

iNamik TableFormatter is a simple set of Java classes to help print text in tabulated form.

With these classes you can organize 'cells' of data into rows and columns. Each cell can contain multiple lines of text and may specify a horizontal alignment (left, center, right) and a vertical alignment (top, center, bottom).

When you are ready to print the data, these classes will ensure that all cells in a given column have the same width and all cells in a given row have the same height.

Using TableFormatter

You can look at an example program to get a feel for how the TableFormatter works. The output of the example program is below.

NOTE: The border is optional

	         1         2         3         4
	1234567890123456789012345678901234567890
1	+-+----------+-+----------+-+----------+
2	|.|..........| |..........| |..........|
3	+-+----------+-+----------+-+----------+
4	|.|Left      | |          | |          |
5	|.|Top       | |Left      | |          |
6	|.|          | |Center    | |Left      |
7	|.|          | |          | |Bottom    |
8	+-+----------+-+----------+-+----------+
9	| |          | |          | |          |
10	+-+----------+-+----------+-+----------+
11	|.|  Center  | |          | |          |
12	|.|   Top    | |  Center  | |          |
13	|.|          | |  Center  | |  Center  |
14	|.|          | |          | |  Bottom  |
15	+-+----------+-+----------+-+----------+
16	| |          | |          | |          |
17	+-+----------+-+----------+-+----------+
18	|.|     Right| |          | |          |
19	|.|       Top| |     Right| |          |
20	|.|          | |    Center| |     Right|
21	|.|          | |          | |    Bottom|
22	+-+----------+-+----------+-+----------+

Table size = 40 x 22

Download TableFormatter

Download Table Formatter 0.96.2

Comments, Problems, Bug Reports

If you have any comments, or need help using TableFormatter, feel free to Email Me.

Any feedback would be appreciated.

You are also invited to register a Trac account. Registration is free and registered users can contribute to Trac tickets as well as create new tickets.

To Do

  • Not sure there needs to be an interface.
  • Considering separating the row/table formatting methods into a different class/interface. Maybe change the name to TextTable and then create a separate TableFormatter class.

  • Also considering just moving the class as is into SimpleTextTable, which would leave room for a ComplexTextTable that might allow more control over the table formatting (i.e. Specifying max column widths and/or word wrap)

Looking for the original Trac Welcome Page?