Skip to main content

Posts

Showing posts from April, 2018

Creating a System Tray notification with icon in Java

The Java language provides support for creating a popup notification with icon ad message. This can be done using many libraries in Java. Here I am going to demonstrate a simple way using AWT SystemTray . SystemTray class in Java: The SystemTray class represents the system tray for a desktop. On Microsoft Windows it is referred to as the "Taskbar Status Area", on Gnome it is referred to as the "Notification Area", on KDE it is referred to as the "System Tray". The system tray is shared by all applications running on the desktop.  On some platforms the system tray may not be present or may not be supported, in this case SystemTray.getSystemTray() throws UnsupportedOperationException. To detect whether the system tray is supported, use SystemTray.isSupported() method which returns true is it is supported.  For example: if (SystemTray.isSupported()) { System.out.println("System tray supported for this one!");         } else {    

Difference between IDE vs API vs Framework vs SDK

IDE (Integrated development environment) IDE is any application that helps you to Write code in them Compile the application Debug the application Refactoring the code Building your application Example : Eclipse, IntelliJ IDEA, Netbeans, Visual Studio, etc. API (Application Programming Interface) APIs are actually interface to any library. It actually explains about the various methods/functions available in the library and how we can make use of those through the code. Example :  JUnit API Framework  A framework is a kit or generic structure that provides a skeleton architecture with which specific software can be implemented. It also a library (or a collection of libraries that work together) that provides a specific coding structure & pattern (thus the word, framework). Example :  Swing Framework contains a set of classes that provides more powerful and flexible GUI components. Spring Framework . SDK (Software Development Kit) SDK contains a complete