I am writting a customized component which need to use the little triangle icon of sortable JTable header. Maybe it's not really an icon file but a graphics painted by some class.
I believe the sort icon comes from the look and feel. For example, in the Windows look and feel, the WindowsTableHeaderUI
looks up the following to draw the appropriate icon. For ascending:
UIManager.getIcon("Table.ascendingSortIcon");
For descending:
UIManager.getIcon("Table.descendingSortIcon");
While the BasicLookAndFeel
registers a value for these properties (so there is likely to be something there if you use a similar call), as @Michael Borgwardt notes (by drawing a conclusion from his answer), there is no guarantee of this since any given look and feel might choose to forego the UIManager
and draw their own graphics.
Still, it might be worthwhile trying it to see if it does what you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With