<?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: Handling red Java console errors	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/handling-red-java-console-errors/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/handling-red-java-console-errors?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=handling-red-java-console-errors</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Fri, 02 Apr 2021 13:10:53 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
	<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/handling-red-java-console-errors#comment-510507</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Fri, 02 Apr 2021 13:10:53 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6468#comment-510507</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/handling-red-java-console-errors#comment-510506&quot;&gt;Yeah&lt;/a&gt;.

Perhaps it&#039;s because the table is empty, I don&#039;t know. In any case, I think you can ignore this error, I don&#039;t think that it affects the functionality.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/handling-red-java-console-errors#comment-510506">Yeah</a>.</p>
<p>Perhaps it&#8217;s because the table is empty, I don&#8217;t know. In any case, I think you can ignore this error, I don&#8217;t think that it affects the functionality.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yeah		</title>
		<link>https://undocumentedmatlab.com/articles/handling-red-java-console-errors#comment-510506</link>

		<dc:creator><![CDATA[Yeah]]></dc:creator>
		<pubDate>Fri, 02 Apr 2021 09:59:56 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6468#comment-510506</guid>

					<description><![CDATA[I have the &quot;Exception in thread &quot;AWT-EventQueue-0&quot; java.lang.NullPointerException&quot; proplem..
and I add these lines in my function. 
the java warning message disappeared.
But I dont know why.


    x=jtable.ToolTipText;
    jtable.ToolTipText=&#039;&#039;;
    jtable.updateUI; 

    % mufunction;

    jtable.ToolTipText=x;]]></description>
			<content:encoded><![CDATA[<p>I have the &#8220;Exception in thread &#8220;AWT-EventQueue-0&#8243; java.lang.NullPointerException&#8221; proplem..<br />
and I add these lines in my function.<br />
the java warning message disappeared.<br />
But I dont know why.</p>
<p>    x=jtable.ToolTipText;<br />
    jtable.ToolTipText=&#8221;;<br />
    jtable.updateUI; </p>
<p>    % mufunction;</p>
<p>    jtable.ToolTipText=x;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Tank Yew		</title>
		<link>https://undocumentedmatlab.com/articles/handling-red-java-console-errors#comment-409642</link>

		<dc:creator><![CDATA[Tank Yew]]></dc:creator>
		<pubDate>Mon, 03 Jul 2017 11:11:14 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6468#comment-409642</guid>

					<description><![CDATA[I get these red java messages on startup but they seem benign. The main problem (for me) is that everytime I use plot or imagesc or any of the graphics UI (zoom, pan, etc.) the console dumps 100s of messages saying the same thing:

JavaSceneServerPeer problem: Couldn&#039;t create JOGL canvas--using painters

It&#039;s not in red and it doesn&#039;t seem to affect anything except for rendering the console useless for conveying information (except for the above message, obviously!). Any ideas how to divert these messages to a log file instead of console?]]></description>
			<content:encoded><![CDATA[<p>I get these red java messages on startup but they seem benign. The main problem (for me) is that everytime I use plot or imagesc or any of the graphics UI (zoom, pan, etc.) the console dumps 100s of messages saying the same thing:</p>
<p>JavaSceneServerPeer problem: Couldn&#8217;t create JOGL canvas&#8211;using painters</p>
<p>It&#8217;s not in red and it doesn&#8217;t seem to affect anything except for rendering the console useless for conveying information (except for the above message, obviously!). Any ideas how to divert these messages to a log file instead of console?</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/handling-red-java-console-errors#comment-395369</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Tue, 06 Dec 2016 14:04:48 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6468#comment-395369</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/handling-red-java-console-errors#comment-395362&quot;&gt;Schorsch&lt;/a&gt;.

@Schorsch - thanks. I corrected this typo in the text.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/handling-red-java-console-errors#comment-395362">Schorsch</a>.</p>
<p>@Schorsch &#8211; thanks. I corrected this typo in the text.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Schorsch		</title>
		<link>https://undocumentedmatlab.com/articles/handling-red-java-console-errors#comment-395362</link>

		<dc:creator><![CDATA[Schorsch]]></dc:creator>
		<pubDate>Tue, 06 Dec 2016 13:32:08 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6468#comment-395362</guid>

					<description><![CDATA[Minor note:
it should be 
&lt;pre lang=&quot;matlab&quot;&gt;fprintf(&#039; \b&#039;);&lt;/pre&gt;
instead of 
&lt;pre lang=&quot;matlab&quot;&gt;fprintf( &#039;\b&#039;);&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>Minor note:<br />
it should be </p>
<pre lang="matlab">fprintf(' \b');</pre>
<p>instead of </p>
<pre lang="matlab">fprintf( '\b');</pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/handling-red-java-console-errors#comment-381952</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Fri, 01 Jul 2016 11:09:16 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6468#comment-381952</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/handling-red-java-console-errors#comment-381904&quot;&gt;Xiangrui Li&lt;/a&gt;.

@Xiangrui - I&#039;m glad I helped. I should have emphasized in the post text that not all suggested remedies work in all cases; in some cases some of them work and in other cases others work. There does not seem to be a general panacea to this issue. The main purpose of the article was to list the &lt;i&gt;possible&lt;/i&gt; solutions in a single place, so that users like yourself could try them out and select those of them that work for each specific case. I&#039;ve now added this clarification to the main text.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/handling-red-java-console-errors#comment-381904">Xiangrui Li</a>.</p>
<p>@Xiangrui &#8211; I&#8217;m glad I helped. I should have emphasized in the post text that not all suggested remedies work in all cases; in some cases some of them work and in other cases others work. There does not seem to be a general panacea to this issue. The main purpose of the article was to list the <i>possible</i> solutions in a single place, so that users like yourself could try them out and select those of them that work for each specific case. I&#8217;ve now added this clarification to the main text.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Xiangrui Li		</title>
		<link>https://undocumentedmatlab.com/articles/handling-red-java-console-errors#comment-381904</link>

		<dc:creator><![CDATA[Xiangrui Li]]></dc:creator>
		<pubDate>Fri, 01 Jul 2016 01:00:25 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6468#comment-381904</guid>

					<description><![CDATA[Wow, this post is just in time for me! I am experiencing the exact problem recently since I start to use &lt;code&gt;DefaultListModel&lt;/code&gt;. I figured out &lt;i&gt;&lt;b&gt;drawnow&lt;/b&gt;&lt;/i&gt; reduces the chance of red output, but it still happens occasionally.

I just tried the suggested tricks one by one. It seems &lt;i&gt;&lt;b&gt;fprintf(&#039; \b&#039;)&lt;/b&gt;&lt;/i&gt; is not very effective. &lt;i&gt;&lt;b&gt;pause&lt;/b&gt;&lt;/i&gt;+&lt;i&gt;&lt;b&gt;drawnow&lt;/b&gt;&lt;/i&gt; works well, and &lt;i&gt;&lt;b&gt;javaObjectEDT&lt;/b&gt;&lt;/i&gt; trick alone works well too. Anyway I am using both for now.

Thanks, Yair.

-Xiangrui]]></description>
			<content:encoded><![CDATA[<p>Wow, this post is just in time for me! I am experiencing the exact problem recently since I start to use <code>DefaultListModel</code>. I figured out <i><b>drawnow</b></i> reduces the chance of red output, but it still happens occasionally.</p>
<p>I just tried the suggested tricks one by one. It seems <i><b>fprintf(&#8216; \b&#8217;)</b></i> is not very effective. <i><b>pause</b></i>+<i><b>drawnow</b></i> works well, and <i><b>javaObjectEDT</b></i> trick alone works well too. Anyway I am using both for now.</p>
<p>Thanks, Yair.</p>
<p>-Xiangrui</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Malcolm Lidierth		</title>
		<link>https://undocumentedmatlab.com/articles/handling-red-java-console-errors#comment-381797</link>

		<dc:creator><![CDATA[Malcolm Lidierth]]></dc:creator>
		<pubDate>Thu, 30 Jun 2016 05:40:45 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=6468#comment-381797</guid>

					<description><![CDATA[A couple of general comments:
&lt;pre lang=&quot;matlab&quot;&gt;pause(0.05); drawnow;  % this never hurt anyone!&lt;/pre&gt;

Flushing the event queue unnecessarily can hurt when large data sets are displayed. Repaints are handled on the EDT, and managed by a RepaintManager that runs on another thread. The RepaintManager seeks to collapse multiple paint requests into a single, or fewer requests (so, if a request to update a specific screen region is called repeatedly, the RepaintManager can paint that region just once putting the end result on the screen). Flushing the queue can potentially disrupt that optimisation. 

For Swing components, calling the &lt;i&gt;revalidate()&lt;/i&gt; method will often be more efficient  - and may be what &lt;pre lang=&quot;matlab&quot;&gt;fprintf(&#039; \b&#039;)&lt;/pre&gt;
achieves. This marks a component as &quot;dirty&quot; and schedules a layout for its parent. It also marks it to be repainted next time an ancestor is repainted - which can be achieved with a direct call to the &lt;i&gt;repaint()&lt;/i&gt; method. Both &lt;i&gt;revalidate&lt;/i&gt; and &lt;i&gt;repaint&lt;/i&gt; methods are thread-safe for JComponents.

In MATLAB, there is still an issue of how that relates to TMW&#039;s graphics pipeline. A final &lt;i&gt;&lt;b&gt;pause/drawnow&lt;/b&gt;&lt;/i&gt; may be needed. 
--

For the unwanted errors: I wonder if those are being written direct to the console or via a logger. MATLAB ships, or once shipped, with log4J. If that is using a console logger for output, it might be possible to replace it and install a custom logger or turn it off.

M]]></description>
			<content:encoded><![CDATA[<p>A couple of general comments:</p>
<pre lang="matlab">pause(0.05); drawnow;  % this never hurt anyone!</pre>
<p>Flushing the event queue unnecessarily can hurt when large data sets are displayed. Repaints are handled on the EDT, and managed by a RepaintManager that runs on another thread. The RepaintManager seeks to collapse multiple paint requests into a single, or fewer requests (so, if a request to update a specific screen region is called repeatedly, the RepaintManager can paint that region just once putting the end result on the screen). Flushing the queue can potentially disrupt that optimisation. </p>
<p>For Swing components, calling the <i>revalidate()</i> method will often be more efficient  &#8211; and may be what </p>
<pre lang="matlab">fprintf(' \b')</pre>
<p>achieves. This marks a component as &#8220;dirty&#8221; and schedules a layout for its parent. It also marks it to be repainted next time an ancestor is repainted &#8211; which can be achieved with a direct call to the <i>repaint()</i> method. Both <i>revalidate</i> and <i>repaint</i> methods are thread-safe for JComponents.</p>
<p>In MATLAB, there is still an issue of how that relates to TMW&#8217;s graphics pipeline. A final <i><b>pause/drawnow</b></i> may be needed.<br />
&#8212;</p>
<p>For the unwanted errors: I wonder if those are being written direct to the console or via a logger. MATLAB ships, or once shipped, with log4J. If that is using a console logger for output, it might be possible to replace it and install a custom logger or turn it off.</p>
<p>M</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
