Sliding Notification bar in java (a la Firefox)

对着背影说爱祢 提交于 2019-11-27 07:23:39

问题


I would like to implement a sliding notification bar as the one in Firefox or IE for my java application. But I don't want to reinvent the wheel and I'm sure someone out there has already done it and is willing to share. Do you know any open-source implementation of this in java/swing?


回答1:


There's an example in Swing Hacks called "Slide Notes Out from the Taskbar" that seems pretty close to what you want (there's a preview on Google's Book Search at the moment).

The code is freely available from the official O'Reilly Swing Hacks page, under "examples." Not sure what the license is, but it's worth a look (Chapter 6, hack 46). At any rate, Swing Hacks is a worthy purchase at ~$20.




回答2:


A standard way to do it is to use Swing TrayIcon API. That would probably be the most convenient way too :)



来源:https://stackoverflow.com/questions/290210/sliding-notification-bar-in-java-a-la-firefox

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