How to make fancy notification messages appear on the desktop using JTelegraph

Hi There,

Greetings. I know its been a long time since my last post. I am sorry; I was busy and couldn’t work on my projects (which I believe are way more cooler than the work I do everyday at office.. 😛 ).

Anyway today I will show you how to bring out fancy notifications on your desktop. (You know, like the ones which microsoft outlook throws up whenever you recieve a mail).

I was building a software that would do the work which I do everyday at office, (Yeah I don’t believe in all that smart-working concept; I work hard instead to build a smart app that would do my work… 😀 )

Lets get started. I have given below the steps to bring out these awesome notifications on your desktop.

Step 1:

First of all to throw fancy (and colorful) notifications on your desktop we use JTelegraph a Java message notification library. You need to get 3 jar files namely,

1) JTelegraph; which is available here –

2) Jcarrierpigeon; which is available here –

3) Timing framework; which is available here –

Step 2:

Open a new java project in eclipse or netbeans and add the 3 library files to the project by following the below steps (if you are using eclipse):

Right click on the project –> properties –> Java build path –> Under the libraries tab click on the add external jars button and add the 3 jar files which you downloaded.

Step 3:

Copy paste the below code into your project.

package ;
import net.sf.jcarrierpigeon.WindowPosition;
import net.sf.jtelegraph.Telegraph;
import net.sf.jtelegraph.TelegraphQueue;
import net.sf.jtelegraph.TelegraphType;

public class Msgnotifitest {

public static void main(String[] args) {
Telegraph tele = new Telegraph("Fancy notification", "Wow this is cool", TelegraphType.NOTIFICATION_DONE, WindowPosition.BOTTOMRIGHT, 2000);
TelegraphQueue q = new TelegraphQueue();

Step 4:

Thats it; now run the application and you should see a notification on the bottom right corner of the screen.



Wow.. you did it.. Now you could get these cool alerts from your java application. This is especially handy when you write an application that is monitoring some other task and keeps reporting to you in a timely manner.

If you face any problem in doing the above steps kindly drop me a comment and I will help you out.

Also note that, I have used TelegraphType.NOTIFICATION_DONE in the above example. There are a lot of other cool, colorful notifications as well. Explore them yourself; after all the sky is the limit. 😀

Finally a word of thanks to the author of JTelegraph; Paulo Roberto Massa Cereda, thanks to you sir

for providing us with such a nice library.

Keep coding; Keep rocking…!! Live long and prosper..!! Peace

Liked it? Take a second to support admin on Patreon!
  • Saboor Hamedi

    Hey sir i have got error have a look here, i also i have download all libraries

    Exception in thread “main” java.lang.NoClassDefFoundError: org/jdesktop/animation/timing/TimingTarget
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(
    at Method)
    at java.lang.ClassLoader.loadClass(
    at sun.misc.Launcher$AppClassLoader.loadClass(
    at java.lang.ClassLoader.loadClass(
    at net.sf.jtelegraph.Telegraph.animate(
    at net.sf.jtelegraph.TelegraphQueue.add(
    Caused by: java.lang.ClassNotFoundException: org.jdesktop.animation.timing.TimingTarget
    at java.lang.ClassLoader.loadClass(
    at sun.misc.Launcher$AppClassLoader.loadClass(
    at java.lang.ClassLoader.loadClass(
    … 15 more