If you're talking about rows/column inversion, it is fairly simple in Swing:
- Create your normal table model class representing columns and rows.
- Create your inverted table model class which is a wrapper around your normal one. The only difference is that you revert calls for columns and rows. For example in
getColumnCount
method of your wrapper model you should callgetRowCount
of the internal one. - Once you have your two models instantiated it is just a matter of replacing them in your
JTable
usingsetModel
method.
Hope that helps..