aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Suggestion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Suggestion" Watch "Suggestion" New topic
Author

Suggestion

Lucky Singh
Ranch Hand

Joined: Jan 19, 2004
Posts: 125
Can you suggest to me what I should use (JTextArea...)if I want to display something in the following format-?
Student ID| Student Name
|
|
|
Don't need a table really.
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

It would be a lot better to use a JTable for this (especially if you are planning on making this information editable by the user), but all you'd have to do is surround the data with tabs (\t) and end each row with a newline (\n). The problem occurs when one or more of your data strings exceeds the space allowed by the tabs and your columns are no longer aligned. You don't have this problem with a JTable.


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Suggestion