Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with JTable

 
Nilanjan Sahu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've problem with inserting rows dynamically in JTable. How can I use DefaultTableModel in jtable if i've already set the model of the table. Can I use JList instead of JCombobox in jTable.
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is just confusing information here without any concrete facts.

1)Do you want to know how to dynamically add rows to the table? Did you go through the DefaultTableModel API? Did you notice any methods which would let you add rows/ columns?
2)What kind of table model have you already provided? What problem are you facing here?
3) You can use any component which subclasses Component as the renderer. The TableCellRenderer#getTableCellRendererComponent() is expected to return a Component, so does the TableCellEditor.

If you give us more information on #1 and #2, it will help us help you.
Please tell us the details
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic