I'm a little surprised that no one asked about this particular case, because this is a strange inconsistency in the standard java libraries:
I use swing JSliders with custom shortcuts; the only library labels available are: setLabelTable(Dictionary labels)
But the dictionary is an abstract class, and its only known subclass in the standard library is Hashtable, which api and various IDEs complain about because they are "deprecated".
The obvious thing is to just use a Hashtable, but I am interested in two things:
- Is there a better way to approach this?
- If a Hashtable is the only useful class for this (in my opinion) sufficiently important library call, on what basis is it "deprecated"?
Thanks!
source share