debugger/enhanced_text_model/src/main/com/thesett/aima/logic/fol/wam/debugger/text/EnhancedTextTableGridRenderer.java
public void renderTable()
    {
        for (int i = 0; i < tableModel.getRowCount(); i++)
        {
            int colOffset = 0;

            for (int j = 0; j < tableModel.getColumnCount(); j++)
            {
                String valueToPrint = tableModel.get(j, i);
                valueToPrint = (valueToPrint == null) ? "" : valueToPrint;
                gridModel.insert(valueToPrint, colOffset, i);

                AttributeSet attributes = tableModel.getAttributeAt(j, i);
                int columnSize = tableModel.getMaxColumnSize(j);

                if (attributes != null)
                {
                    for (int k = 0; k < columnSize; k++)
                    {
                        gridModel.insertAttribute(attributes, colOffset + k, i);
                    }
                }

                // Pad spaces up to the column width if the contents are shorter.
                int spaces = columnSize - valueToPrint.length();

                while (spaces > 0)
                {
                    gridModel.insert(" ", colOffset + valueToPrint.length() + spaces-- - 1, i);
                }

                // Shift to the next column.
                colOffset += columnSize;
            }
        }
    }
public void renderTable()
    {
        for (int i = 0; i < tableModel.getRowCount(); i++)
        {
            int colOffset = 0;

            for (int j = 0; j < tableModel.getColumnCount(); j++)
            {
                String valueToPrint = tableModel.get(j, i);
                valueToPrint = (valueToPrint == null) ? "" : valueToPrint;
                gridModel.insert(valueToPrint, colOffset, i);

                AttributeSet attributes = tableModel.getAttributeAt(j, i);
                int columnSize = tableModel.getMaxColumnSize(j);

                if (attributes != null)
                {
                    for (int k = 0; k < columnSize; k++)
                    {
                        gridModel.insertAttribute(attributes, colOffset + k, i);
                    }
                }

                // Pad spaces up to the column width if the contents are shorter.
                int spaces = columnSize - valueToPrint.length();

                while (spaces > 0)
                {
                    gridModel.insert(" ", colOffset + valueToPrint.length() + spaces-- - 1, i);
                }

                // Shift to the next column.
                colOffset += columnSize;
            }
        }
    }
Renders the table.