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

查看:29
本文介绍了聊天客户端表情窗口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天全站免登陆