I am using graphics.drawChars to write static text to a signed applet. I would like to be able to select this text and copy it to the system clipboard. I have the copy to clipboard part working. However I need to find a way to allow the user to select the text which I will add to the StringBuffer and then transfer to the clipboard.
Once it's drawn, the JRE has no idea that it was text to begin with, so unless you keep track of all text that is drawn and can retrieve it later during the "select" operation, this would be difficult to achieve (barring the use of OCR).
You'd also need to keep track of where on the Graphics which text is drawn (x/y coordinates), so that you can associate the user's selection with the text.