Equivalent to Android's Toast or Mac OSX Growl in Java Swing?

与世无争的帅哥 提交于 2019-12-21 18:07:29

问题


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.

Growl screenshot:

Android Toast screenshot:
(source: devx.com)

回答1:


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.



来源:https://stackoverflow.com/questions/2668790/equivalent-to-androids-toast-or-mac-osx-growl-in-java-swing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!