Start by taking a look at:
- Creating a GUI With JFC/Swing for details about how to create a UI using Swing
- How to Use Swing Timers as a possible alternative to other timer mechnisms. The benefit of this is that it is executed within the context of the Event Dispatching Thread, so you don't need to mess to much about re-syncing the UI code with the EDT when the timer goes off. May not suit your requirements, but it's nice to know.
- How to Use the System Tray
Updated
- Create a
JWindow
. - Set the background color of the content pane to
Color.BLACK
- Set the
alwaysOnTop
totrue
- Create a
JLabel
, set it'stext
property and change it'sforeground
color to something likeColor.WHITE
, adjust what ever other properties you - Add a
Border
to the content if you want to add some padding - Add the label to the content pane
pack
the window- set it's
locationRelativeTo
null
, to make it appear in the center of the screen - Make the window visible
Possible examples...