So an alternative route would be to subclass:
class myTable extends JTable {
myType myKey;
}
The problem with subclassing is you really want to insert the methods
in JComponent. You have to add them independently to every Component
you want to customise. About the only help Java gives you is the
interface which can be used to make sure you don't forget some of the
methods, and to let you get at the methods abstractly. Seems to me I
remember reading back in the 90s it was possible in SmallTalk to
insert extra methods in a base class.
--
Roedy Green Canadian Mind Products
http://mindprod.com
The population is aging, especially in Japan and
there are not enough young people to take care of them. This will
stimulate the evolution of caretaker robots, at first
supervised and largely controlled remotely by human nurses.
Over time they will work more and more independently
doing tasks like bathing, feeding, cleaning up, dispensing
medications and acting as companions by playing games
and conversing. The technology can then be loosed on
mankind's most vexing problem -- being sexually
attracted to people who have no interest back.
..