This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General 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