Reputation: 741
I do not want to reinvent the wheel, so I'd like to know if exist some component of notification, like TrayIcon, that I can set the location. Example: When I click over a button, show the notification beside the button, into my project.
Thanks,
Upvotes: 0
Views: 139
Reputation: 11607
The library you found yourself looks nice. If you want to construct something similar yourself you need to use JWindow
as base class; it is a top level window like JFrame
but without borders. You just need to position it relative to your component. To get the screen position of a component you would use SwingUtilities#convertPointToScreen
. Then you can just design as you want and use standard components and layout managers.
Upvotes: 1