File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Table format Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Table format" Watch "Table format" New topic

Table format

Maureen Charlton
Ranch Hand

Joined: Oct 04, 2004
Posts: 218
Is anyone able to suggest where I look for some example code to enable something to be output to table format?

- I know I'm being a little lazy but I would be happy to copy the number of \t\t's etc?
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33124

What are you trying to output data to?

Screen? File? Swing? Web page?

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Maureen Charlton
Ranch Hand

Joined: Oct 04, 2004
Posts: 218
Just want to copy a load of println's with tabs and | to output something in a table to make it look pretty.

I thought maybe someone had already done this and I could simply copy it. Not a real problem - I have done it now.

Thanks though!
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

For future reference - JDK1.5 offers the printf method, where you can specify the format of the output. Many logging implementations too give you ways to format output.
[ November 30, 2004: Message edited by: Paul Sturrock ]

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
I agree. Here's the link:
subject: Table format
It's not a secret anymore!