Reputation: 1583
I am looking for methods to allow transposing my jTable on my UI. It could be by clicking a button or other action. My main question is how should I build the data model(abstractTableModel) for such purpose? And is there any ready-to-use method support such transposing in Java?
Upvotes: 1
Views: 2000
Reputation: 17369
If you're talking about rows/column inversion, it is fairly simple in Swing:
getColumnCount
method of your wrapper model you should call getRowCount
of the internal one.JTable
using setModel
method.Hope that helps..
Upvotes: 4