Sirs,
I am writing a short GUI based program in Java using the NetBeans IDE. The overall agenda of the program is to create a long string of automatically generated text that appears in a text box (JTextPane, to be exact). The text generated will be cut and pasted by the user into another application.
One of the features that I would like to add to my application is a button that says "Copy text to clipboard" and does exactly that. As my application stands, the user has to copy and paste the text for themselves.
Can anyone get me started on what event/object methods/properties to use to create such functionality in a button? It would be perfectly acceptable to just point me in the right direction -- I'm not expecting a comprehensive answer. However, I would appreciate a response more specific that "consult the NetBeans manual". I can already write basic and intermediate GUI applications and I am well aware of the existence of documentation. None of the other questions that I have searched for on this site seem to address this issue directly -- unless I have missed something altogether.
I would copy and paste the source code to my program, but it is well over 2000 lines long, and I'm not sure it is necessary anyway. I would be happy to provide any additional info about my application if it is needed. I guess my biggest problem is that I'm not even sure of what keywords I need to even begin such a search.
Thank you in advance,
the_photon