是否等效于Java Swing中的Android Toast或Mac OSX Growl? [英] Equivalent to Android's Toast or Mac OSX Growl in Java Swing?

查看:151
本文介绍了是否等效于Java Swing中的Android Toast或Mac OSX Growl?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

寻找一种在Swing应用程序中显示瞬态,非模态对话框的方法.换句话说,我想弹出一个半透明的框,其中包含一些可以立即被消除的文本,或者将在一定时间内消失的文本.有图书馆可以这样做吗?如果车轮已经存在,我不想重新发明.

Looking for a means of displaying transient, non-modal dialogs in a Swing application. In other words, I'd like to pop up a semi-transparent box with some text in it that can be immediately dismissed, or will fade away in a set amount of time. Is there a library to do this? I don't want to reinvent the wheel if it already exists.

咆哮屏幕截图: Android Toast 屏幕截图:
(来源: devx.com )

Growl screenshot: Android Toast screenshot:
(source: devx.com)

推荐答案

This link provides information about "translucent shaped Windows" using Swing, though it does not provide the full sourcecode (but slides explaining what has to be done in order to achieve this). He basically uses JNA to avoid problems with repainting translucent windows and makes use of two libraries to easily add fade etc. support.

这篇关于是否等效于Java Swing中的Android Toast或Mac OSX Growl?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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