I am looking for a ready made Container (may be extension of JPabel) into which I can add components such that I can move the component dynamically with mouse. Is there any such container available? If not, is there a standard way to do it? I am able to do rudimemtary moving logic by extending a JPanel and using null layoutmanager etc. But I am not sure whether I am doing it the right way. Here is my code:
I don't know of a ready made component for this that is in the JDK. That doesn't mean that there isn't one out there. I have just never hunted for one. As far as how you are doing it currently, if it works, it works. Sometimes the correct way is the working way. And with swing, this is all too often the case I am afraid.