dat_geezer 0 Newbie Poster

Hi, first time poster here, but i'm having some troubles with a project i'm working on. I'm not in need of a solution, just some pointers to get me going?

I have a GUI which is a text editor for a programming language. Basically, i have all the functionalities of any text editor but i've added my own "thing". I have a JPanel which i've imported into a SplitPane in the gui which contains a button "Generate new button".
Now, this button extends JButton, so everytime i click this button, a new button is created. Fine. All works well. I am able to give the button a new name via prompt. Then, when a name has been defined, the user would then click on the newly named button, and a popup will appear as a new jframe with a JTextArea, where a user can then type in some text and save to file if they choose.

My main question is, is that i want to drag and drop this jbutton onto the main text editor area in my GUI (so the first pane of the splitpane) and then, the JTextArea will display the text that the user had typed in the pop-up JTextArea. I've managed to implement a sort of drag and drop, but it doesn't work very well.
I can drag the JButton onto the JTextArea, but it will either drag the NAME of the JButton or, i will manually have to open the button and then drag and drop the text from the popup JTextArea, which is pointless and defeats the object of whati want. Once, however, i implement this drag and drop, i'm unable to recall my original source? So i won't be able to click on the JButton again, or type any text into the popup JTextArea, depending on which method i use.

I haven't got any code with my because i'm on a different comp, but i will post some code if it is needed.

I hope someone can help, will be deeply appreciated.

Many thanks.