Copy Paste Icon in JTextPanel
I am doing a chat program with Javaswing and I would like to insert smileys in a JtextPanel and be able to select them for copy paste (in the same panel).
I'm doing that at this moment :
Icon iconSmiley = new javax.swing.ImageIcon(getClass().getResource("/ola/smileys/smiley-angel.png")); this.messageTextArea.insertIcon(iconSmiley);
but it's not working
somebody has any idea ?
May be this? http://java-sl.com/tip_autoreplace_smiles.html