One possible way would be to work out the number of characters that are going to be displayed (using String.length()) and then add in spaces using for loops as necessary rather than using tabs.
...