<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: Setting system tray icons	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/setting-system-tray-icons/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/setting-system-tray-icons?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=setting-system-tray-icons</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Wed, 16 Mar 2016 10:36:04 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.3</generator>
	<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/setting-system-tray-icons#comment-372036</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Wed, 16 Mar 2016 10:36:04 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=67#comment-372036</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/setting-system-tray-icons#comment-372034&quot;&gt;Sam Roberts&lt;/a&gt;.

thanks for the update Sam]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/setting-system-tray-icons#comment-372034">Sam Roberts</a>.</p>
<p>thanks for the update Sam</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Sam Roberts		</title>
		<link>https://undocumentedmatlab.com/articles/setting-system-tray-icons#comment-372034</link>

		<dc:creator><![CDATA[Sam Roberts]]></dc:creator>
		<pubDate>Wed, 16 Mar 2016 09:54:56 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=67#comment-372034</guid>

					<description><![CDATA[Hi Yair,

You recommend calling &lt;code /&gt;systray = java.awt.SystemTray.getSystemTray&lt;/code&gt;, and then &lt;code&gt;systray.isSupported&lt;/code&gt; afterwards to check if the system tray is supported. Unfortunately, if the system tray isn&#039;t supported (for example, I just tried this when running MATLAB remotely over an X Window), the original call to &lt;code&gt;getSystemTray&lt;/code&gt; can error.

Instead, you can call &lt;code&gt;java.awt.SystemTray.isSupported&lt;/code&gt;. This returns true or false, and doesn&#039;t error in an unsupported environment. Call &lt;code&gt;getSystemTray&lt;/code&gt; only if that returns true.]]></description>
			<content:encoded><![CDATA[<p>Hi Yair,</p>
<p>You recommend calling <code></code>systray = java.awt.SystemTray.getSystemTray, and then <code>systray.isSupported</code> afterwards to check if the system tray is supported. Unfortunately, if the system tray isn&#8217;t supported (for example, I just tried this when running MATLAB remotely over an X Window), the original call to <code>getSystemTray</code> can error.</p>
<p>Instead, you can call <code>java.awt.SystemTray.isSupported</code>. This returns true or false, and doesn&#8217;t error in an unsupported environment. Call <code>getSystemTray</code> only if that returns true.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/setting-system-tray-icons#comment-346665</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Sat, 14 Mar 2015 16:47:25 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=67#comment-346665</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/setting-system-tray-icons#comment-346611&quot;&gt;Ange Laure&lt;/a&gt;.

Matlab is obviously not finding your icon in the stated classpath...
If you need assistance debugging your specific program, contact me by email for a short consultancy.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/setting-system-tray-icons#comment-346611">Ange Laure</a>.</p>
<p>Matlab is obviously not finding your icon in the stated classpath&#8230;<br />
If you need assistance debugging your specific program, contact me by email for a short consultancy.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ange Laure		</title>
		<link>https://undocumentedmatlab.com/articles/setting-system-tray-icons#comment-346611</link>

		<dc:creator><![CDATA[Ange Laure]]></dc:creator>
		<pubDate>Fri, 13 Mar 2015 17:53:44 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=67#comment-346611</guid>

					<description><![CDATA[Hi Yair, 

thanks! I get another problem. I have implemented a GUI in Java which contains Icon (ImageIcon). Then I exported the class files in a .jar file which I add to the classpath von Matlab. Unfortunately everything on the GUI appear apart from the icons. Do you know what I am doing wrong? 

Regards, 
Ange Laure]]></description>
			<content:encoded><![CDATA[<p>Hi Yair, </p>
<p>thanks! I get another problem. I have implemented a GUI in Java which contains Icon (ImageIcon). Then I exported the class files in a .jar file which I add to the classpath von Matlab. Unfortunately everything on the GUI appear apart from the icons. Do you know what I am doing wrong? </p>
<p>Regards,<br />
Ange Laure</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/setting-system-tray-icons#comment-346563</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Thu, 12 Mar 2015 16:47:15 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=67#comment-346563</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/setting-system-tray-icons#comment-346562&quot;&gt;Ange Laure&lt;/a&gt;.

@Ange - no, there are many other higher-priority items on my plate...]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/setting-system-tray-icons#comment-346562">Ange Laure</a>.</p>
<p>@Ange &#8211; no, there are many other higher-priority items on my plate&#8230;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ange Laure		</title>
		<link>https://undocumentedmatlab.com/articles/setting-system-tray-icons#comment-346562</link>

		<dc:creator><![CDATA[Ange Laure]]></dc:creator>
		<pubDate>Thu, 12 Mar 2015 16:42:57 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=67#comment-346562</guid>

					<description><![CDATA[Hi Yair, 

did you already get a way to fix the java exceptions in matlab? 

Thanks,
Ange Laure]]></description>
			<content:encoded><![CDATA[<p>Hi Yair, </p>
<p>did you already get a way to fix the java exceptions in matlab? </p>
<p>Thanks,<br />
Ange Laure</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Jack Rayman		</title>
		<link>https://undocumentedmatlab.com/articles/setting-system-tray-icons#comment-328132</link>

		<dc:creator><![CDATA[Jack Rayman]]></dc:creator>
		<pubDate>Sat, 19 Jul 2014 13:49:44 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=67#comment-328132</guid>

					<description><![CDATA[Hi.

I&#039;m using your code like this in Matlab r2014a in windows 8.1 First I got a java exception so I used this: 

&lt;pre lang=&#039;matlab&#039;&gt;
t=java.awt.Toolkit.getDefaultToolkit();
ev=t.getAWTEventListeners()
for i=1:length(ev)
    str=ev(i).getListener().getClass.toString
    if str.indexOf(&#039;com.mathworks.mwswing.desk.DTSelectionManager&#039;)&gt;=0 &#124;&#124; ...
            str.indexOf(&#039;javax.swing.plaf.basic.BasicLookAndFeel&#039;)&gt;=0
        t.removeAWTEventListener(ev(i))
    end
end

sysTray = java.awt.SystemTray.getSystemTray;
if (sysTray.isSupported)
    myIcon = fullfile(matlabroot,&#039;/toolbox/matlab/icons/matlabicon.gif&#039;);
    iconImage = java.awt.Toolkit.getDefaultToolkit.createImage(myIcon);
    trayIcon = java.awt.TrayIcon(iconImage, &#039;initial tooltip&#039;);
    trayIcon.setToolTip(&#039;click this icon for applicative context menu&#039;);
end
&lt;/pre&gt;

After running this code I have a blank icon near clock without no message and without no icon. What should I do?]]></description>
			<content:encoded><![CDATA[<p>Hi.</p>
<p>I&#8217;m using your code like this in Matlab r2014a in windows 8.1 First I got a java exception so I used this: </p>
<pre lang='matlab'>
t=java.awt.Toolkit.getDefaultToolkit();
ev=t.getAWTEventListeners()
for i=1:length(ev)
    str=ev(i).getListener().getClass.toString
    if str.indexOf('com.mathworks.mwswing.desk.DTSelectionManager')>=0 || ...
            str.indexOf('javax.swing.plaf.basic.BasicLookAndFeel')>=0
        t.removeAWTEventListener(ev(i))
    end
end

sysTray = java.awt.SystemTray.getSystemTray;
if (sysTray.isSupported)
    myIcon = fullfile(matlabroot,'/toolbox/matlab/icons/matlabicon.gif');
    iconImage = java.awt.Toolkit.getDefaultToolkit.createImage(myIcon);
    trayIcon = java.awt.TrayIcon(iconImage, 'initial tooltip');
    trayIcon.setToolTip('click this icon for applicative context menu');
end
</pre>
<p>After running this code I have a blank icon near clock without no message and without no icon. What should I do?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/setting-system-tray-icons#comment-74</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Sat, 04 Apr 2009 16:55:24 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=67#comment-74</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/setting-system-tray-icons#comment-66&quot;&gt;wei&lt;/a&gt;.

wei - you can change the figure icon (not without the JavaFrame), but I&#039;m told this &lt;a href=&quot;http://www.mathworks.com/support/solutions/data/1-16N4J.html&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;may violate Matlab&#039;s license&lt;/a&gt;. I&#039;m really not sure why MathWorks (TMW) chose to limit this pretty harmless customization, but there you have it. In all my posts I try to stay on the good side of the line, so I&#039;m afraid I can&#039;t help you here... If you have a specific need for a customer project, then perhaps if you approach TMW they&#039;ll agree to give you special permission.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/setting-system-tray-icons#comment-66">wei</a>.</p>
<p>wei &#8211; you can change the figure icon (not without the JavaFrame), but I&#8217;m told this <a href="http://www.mathworks.com/support/solutions/data/1-16N4J.html" target="_blank" rel="nofollow">may violate Matlab&#8217;s license</a>. I&#8217;m really not sure why MathWorks (TMW) chose to limit this pretty harmless customization, but there you have it. In all my posts I try to stay on the good side of the line, so I&#8217;m afraid I can&#8217;t help you here&#8230; If you have a specific need for a customer project, then perhaps if you approach TMW they&#8217;ll agree to give you special permission.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: wei		</title>
		<link>https://undocumentedmatlab.com/articles/setting-system-tray-icons#comment-66</link>

		<dc:creator><![CDATA[wei]]></dc:creator>
		<pubDate>Fri, 03 Apr 2009 15:05:59 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=67#comment-66</guid>

					<description><![CDATA[@Yair, Can one change figure&#039;s icon wihtout JavaFrame?]]></description>
			<content:encoded><![CDATA[<p>@Yair, Can one change figure&#8217;s icon wihtout JavaFrame?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: wei		</title>
		<link>https://undocumentedmatlab.com/articles/setting-system-tray-icons#comment-32</link>

		<dc:creator><![CDATA[wei]]></dc:creator>
		<pubDate>Tue, 31 Mar 2009 22:11:41 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=67#comment-32</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/setting-system-tray-icons#comment-31&quot;&gt;Yair Altman&lt;/a&gt;.

@Yair, That&#039;s nice to know. Thank you.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/setting-system-tray-icons#comment-31">Yair Altman</a>.</p>
<p>@Yair, That&#8217;s nice to know. Thank you.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
