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 ?

Best Regards

Answers


May be this? http://java-sl.com/tip_autoreplace_smiles.html


Need Your Help

How do I determine the encoding used in an ASP.NET MVC Post?

c# asp.net-mvc asp.net-mvc-4 unicode utf-8

I need to read data from an MVC POST but want to make sure that I read the POST data in the correct encoding.

jquery statement not evaluating as true when setting two variables as the same dom element

javascript jquery if-statement

I'm trying to handle mouseover / mouseout animations and a statement I have is not evaluating to true when you mouseover an element that you previously moused over. I'm trying to prevent a double

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.