• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTable rotate  RSS feed

 
Manish Hatwalne
Ranch Hand
Posts: 2596
Android Firefox Browser Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to create a TableModel which will give transpose of any tablemodel. So that getValueAT(row, col) will give me originalTableMOdel.getValueAt(col,row). I have almost done it but I am stuck at a point where I am unable to understand how can I implement setValueAt() method correctly. It would give problems if column classes are different.
Has anyone worked on similar problem? Any insights? Any help would be greatly appreciated.
TIA,
- Manish
 
VIJAY Yadlapati
Ranch Hand
Posts: 175
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For this, you should have 2 TableModels - The originalTableModel and the transposeTableModel.
In transposeTableModel, you have to refer the originalTableModel in the logic for transpose in methods you implement.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!