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

tray.SystemTrayProvider Maven / Gradle / Ivy

Go to download

Provides a simple adapter that makes the tray use gtk under linux, providing a native look and feel.

The newest version!
package tray;

import tray.java.JavaTrayAdapter;
import tray.linux.LinuxNativeTrayAdapter;


public class SystemTrayProvider {

	public SystemTrayAdapter getSystemTray() {
		String osName = System.getProperty("os.name").toLowerCase();
		if (osName.startsWith("linux")) {
			try {
				return new LinuxNativeTrayAdapter();
			}catch(Exception e) {
				
			}
		}
		return new JavaTrayAdapter();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy