This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Suggestion" Watch "Suggestion" New topic


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

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.

Write once, run anywhere, because there's nowhere to hide! - /. A.C.
I agree. Here's the link:
subject: Suggestion
Similar Threads
WA #1.....word association
instance variable with the same name as the class?
getFirstName from one class (set & get) to another class (Main Program)
Need voucher for SCWCD 5.0
An array of objects????