All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.demo.CustomNotificationDemo Maven / Gradle / Ivy

Go to download

JCommunique is a free, open-source desktop notification library. It offers a range of features with a simple-to-use API. This is a maven repack, code is unchanged

The newest version!
package com.demo;

import com.notification.NotificationFactory;
import com.notification.NotificationManager;
import com.notification.NotificationFactory.Location;
import com.notification.manager.SimpleManager;
import com.platform.Platform;
import com.theme.ThemePackagePresets;
import com.utils.Time;

public class CustomNotificationDemo {
	public static void main(String[] args) throws Exception {
		Platform.instance().setAdjustForPlatform(true);
		// UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");
		// register the custom builder with the factory
		NotificationFactory factory = new NotificationFactory(ThemePackagePresets.cleanLight());
		factory.addBuilder(CustomNotification.class, new CustomNotification.CustomBuilder());

		// add the Notification
		NotificationManager manager = new SimpleManager(Location.NORTH);
		manager.addNotification(factory.build(CustomNotification.class, "this is test text"), Time.infinite());
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy