聊天客户端表情符号窗口JAVA [英] Chat Client emoticons window JAVA

查看:464
本文介绍了聊天客户端表情符号窗口JAVA的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在努力创建一个聊天客户端(java swing),我只是让我的表情符号完全可用,但除了让用户输入:)之外,我想提供一个弹出窗口,包含所有可用的表情符号。我正在寻找的是一种制作这样一个窗口的方法(例如像Skype一样)。我该如何以及如何去做?我尝试过使用JMenu,但它没有做我想要的。我想在输入文本区域附近放一个小图像(可能是表情符号),当它被点击时,会弹出一个充满表情符号的方块,然后在鼠标点击上输入例如文本区域中的:)。

I've been working on creating a chat client(java swing) and I've just made my emoticons fully useable but other than having users type ":)" for example, I want to provide a popup window with all the available emoticons. What I'm searching for is a way to make such a window( for example like Skype's). How and with what can I go about it? I've tried with a JMenu, but it doesn't do what I want. I want to put a small image(probably emoticon) near the enter text area and when it's clicked, a square filled with emoticons pops up and on mouse click for example ":)" is entered in the text area.

推荐答案

我想你的意思是像这样的聊天窗口。在这种情况下,您需要学习如何将组件层叠在一起,在这种情况下是jPanel,或嵌套在主jFrame中的jLayeredPane。

I suppose you mean a chat window like this sort. In that case, you'll need to learn how to layer components over one another, in this case a jPanel, or a jLayeredPane nested inside the main jFrame.

这篇关于聊天客户端表情符号窗口JAVA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆