• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTable Instead of JTextArea  RSS feed

 
mouna chabane
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have this code when i selected a node it display the attribut and value of it in JTextArea but i want it into table :

 
Rob Camick
Ranch Hand
Posts: 2788
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read the section from the Swing tutorial on How to Use Tables for the basics of using a JTable.

You can use a DefaultTableModel for the table and then you can use the addRow(...) method to add each row of data to the model.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!