Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Suggestion

 
Lucky Singh
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic