I have a simpe Swing application for drawing different shapes (circle, triangle, square and etc.). It works like that: you have to choose shape type, click somewhere in the apllication window and get the chosen shape drawn where you clicked. And I have to add a functionality that allows to add new shapes (classes) on the runtime via plugin.
Plugin is a file that somehow describes a new shape (class) and its functionality and exists somewhere in the system (in some folder).
My question: what is the best way to implement this? What approaches, libraries and sources can you recommend?
I have found some information about JPF (Java Plug-in Framework), but I'm not sure that this is what I need becaust it looks quite enormous and seems to be used for other purposes (maybe I'm wrong).
Thank you.