I want my project to imitate the gui palette in netbeans where the user clicks a component button and if the cursor is inside the frame, then the component appears under the cursor, the component can be drag and drop anywhere in the frame. can someone help me how to do this thing?
I provided a picture below about the gui pallete in netbeans.

http://i1160.photobucket.com/albums/...guipalette.png