I have an JTable which is using RowSorter(Java 1.6) and I am using the look and feel which was implemented using Java 1.4, when RowSorter was not added in Java. Now my problem is: when I click on the table header, table gets sorted but the RosSorter icon does not appear on the Table header. I need that icon somehow and I can not upgrade the existing look and feel. Any help ?
Share
The basic approach is to wrap the renderer that is supplied by the LAF, let it configure the rendering component and additionally make it paint a sort icon as appropriate. Something like:
That’s the easiest case, working if the rendering component is-a JLabel and doesn’t use its icon property somehow else.