Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Create a table with JTextArea in Swing

 
Kofi Nimako
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All:

Does anyone know how to create a table of rows and columns and input text and numbers using JtextArea in Swing ?

Thanks :roll:
 
Ben Wood
Ranch Hand
Posts: 342
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kofi,

I don't see how you'd do that with JTextArea. Take a look at JTable instead maybe.
 
Rachel Swailes
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look on the Sun website for the JTable tutorial (you can also access it from the API.) You can use a JTextArea in a JTable. Compare it in the tutorial to the example they have using a JComboBox.

Cheers,
Rachel
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic