If I want to manually size my icon for the system tray, how do I find out the correct size for the platform?

John Zukowski

The getTrayIconSize() method of SystemTray will return the appropriate Dimension for the icon. This allows you to either pick the most appropriate size from available icons or generate an icon of the appropriate size, instead.