<?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: Editbox data input validation	</title>
	<atom:link href="https://undocumentedmatlab.com/articles/editbox-data-input-validation/feed" rel="self" type="application/rss+xml" />
	<link>https://undocumentedmatlab.com/articles/editbox-data-input-validation?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=editbox-data-input-validation</link>
	<description>Professional Matlab consulting, development and training</description>
	<lastBuildDate>Fri, 22 Oct 2021 17:55:07 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
	<item>
		<title>
		By: LSHC		</title>
		<link>https://undocumentedmatlab.com/articles/editbox-data-input-validation#comment-511911</link>

		<dc:creator><![CDATA[LSHC]]></dc:creator>
		<pubDate>Fri, 22 Oct 2021 17:55:07 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=4229#comment-511911</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/editbox-data-input-validation#comment-355492&quot;&gt;Adam&lt;/a&gt;.

I have the same problem in 2021 haha]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/editbox-data-input-validation#comment-355492">Adam</a>.</p>
<p>I have the same problem in 2021 haha</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Yair Altman		</title>
		<link>https://undocumentedmatlab.com/articles/editbox-data-input-validation#comment-482333</link>

		<dc:creator><![CDATA[Yair Altman]]></dc:creator>
		<pubDate>Wed, 12 Jun 2019 15:49:58 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=4229#comment-482333</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/editbox-data-input-validation#comment-482331&quot;&gt;Pedro Luis Guevara&lt;/a&gt;.

Pedro - I will be happy to assist you as a professional (paid) consultant. Email me if you are interested.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/editbox-data-input-validation#comment-482331">Pedro Luis Guevara</a>.</p>
<p>Pedro &#8211; I will be happy to assist you as a professional (paid) consultant. Email me if you are interested.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Pedro Luis Guevara		</title>
		<link>https://undocumentedmatlab.com/articles/editbox-data-input-validation#comment-482331</link>

		<dc:creator><![CDATA[Pedro Luis Guevara]]></dc:creator>
		<pubDate>Wed, 12 Jun 2019 15:46:40 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=4229#comment-482331</guid>

					<description><![CDATA[Good morning. I have the following problem I have a uitable in main GUI that has &quot;n&quot; rows (the rows depend on the value that the user enters in a text box) and 10 columns. I require a code (something like a keypresskeypress event) that allows me to evaluate and discard the entered data that are not numeric both in the uitable and in some text boxes that I have in the main GUI. I do not know much about event management in MATLAB and I&#039;m having a lot of problems with this. My uitable is called (&quot;TablaDatosElementos&quot;) and the text box that allows creating the number of rows is called (&quot;NumElem&quot;) Thank you very much and I hope you can help me.

I am a beginner in the use of MATLAB and more when I use tools that are foreign to it (like JAVA). Will it be that one of you can help me design a code for what I need? I can provide lines of the code of the program that I am doing if that helps.

I hope you can help me with this big problem.


Thank you]]></description>
			<content:encoded><![CDATA[<p>Good morning. I have the following problem I have a uitable in main GUI that has &#8220;n&#8221; rows (the rows depend on the value that the user enters in a text box) and 10 columns. I require a code (something like a keypresskeypress event) that allows me to evaluate and discard the entered data that are not numeric both in the uitable and in some text boxes that I have in the main GUI. I do not know much about event management in MATLAB and I&#8217;m having a lot of problems with this. My uitable is called (&#8220;TablaDatosElementos&#8221;) and the text box that allows creating the number of rows is called (&#8220;NumElem&#8221;) Thank you very much and I hope you can help me.</p>
<p>I am a beginner in the use of MATLAB and more when I use tools that are foreign to it (like JAVA). Will it be that one of you can help me design a code for what I need? I can provide lines of the code of the program that I am doing if that helps.</p>
<p>I hope you can help me with this big problem.</p>
<p>Thank you</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: b		</title>
		<link>https://undocumentedmatlab.com/articles/editbox-data-input-validation#comment-367101</link>

		<dc:creator><![CDATA[b]]></dc:creator>
		<pubDate>Fri, 08 Jan 2016 10:22:06 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=4229#comment-367101</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://undocumentedmatlab.com/articles/editbox-data-input-validation#comment-355492&quot;&gt;Adam&lt;/a&gt;.

I have the same issue as Adam. For some reason it helps to display some (invisible) text in the command window before issuing setText(), like so:

&lt;pre lang=&#039;matlab&#039;&gt;
fprintf(repmat(&#039; \b&#039;,1,500))
jObj.setText(txt);
&lt;/pre&gt;

This helps preventing the aforementioned NPE in most (but not all) cases. Can anyone explain this?

MATLAB 2015b 64-bit on Win7 64-bit machine.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a href="https://undocumentedmatlab.com/articles/editbox-data-input-validation#comment-355492">Adam</a>.</p>
<p>I have the same issue as Adam. For some reason it helps to display some (invisible) text in the command window before issuing setText(), like so:</p>
<pre lang='matlab'>
fprintf(repmat(' \b',1,500))
jObj.setText(txt);
</pre>
<p>This helps preventing the aforementioned NPE in most (but not all) cases. Can anyone explain this?</p>
<p>MATLAB 2015b 64-bit on Win7 64-bit machine.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Adam		</title>
		<link>https://undocumentedmatlab.com/articles/editbox-data-input-validation#comment-355492</link>

		<dc:creator><![CDATA[Adam]]></dc:creator>
		<pubDate>Wed, 19 Aug 2015 20:19:31 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=4229#comment-355492</guid>

					<description><![CDATA[Keeps showing Java exception errors in the Command Window. I have added some null checks into the editboxValidation function but couldn&#039;t stop the error messages being displayed. When I hit a non-numeric character like space or a letter, computer beeps as it should and a long list of Java exception errors are shown in the Command Window. I am copying the error output below. I would appreciate if you could shed a light. Using MATLAB R2014a 32-bit on Windows 7 64-bit machine. Thank you.

Exception in thread &quot;AWT-EventQueue-0&quot; java.lang.NullPointerException
	at javax.swing.text.DefaultCaret.paint(Unknown Source)
	at javax.swing.plaf.basic.BasicTextUI.paintSafely(Unknown Source)
	at javax.swing.plaf.basic.BasicTextUI.paint(Unknown Source)
	at javax.swing.plaf.basic.BasicTextUI.update(Unknown Source)
	at javax.swing.JComponent.paintComponent(Unknown Source)
	at javax.swing.JComponent.paint(Unknown Source)
	at javax.swing.JComponent.paintToOffscreen(Unknown Source)
	at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
	at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
	at javax.swing.RepaintManager.paint(Unknown Source)
	at javax.swing.JComponent._paintImmediately(Unknown Source)
	at javax.swing.JComponent.paintImmediately(Unknown Source)
	at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)
	at javax.swing.RepaintManager.access$700(Unknown Source)
	at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$200(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)]]></description>
			<content:encoded><![CDATA[<p>Keeps showing Java exception errors in the Command Window. I have added some null checks into the editboxValidation function but couldn&#8217;t stop the error messages being displayed. When I hit a non-numeric character like space or a letter, computer beeps as it should and a long list of Java exception errors are shown in the Command Window. I am copying the error output below. I would appreciate if you could shed a light. Using MATLAB R2014a 32-bit on Windows 7 64-bit machine. Thank you.</p>
<p>Exception in thread &#8220;AWT-EventQueue-0&#8221; java.lang.NullPointerException<br />
	at javax.swing.text.DefaultCaret.paint(Unknown Source)<br />
	at javax.swing.plaf.basic.BasicTextUI.paintSafely(Unknown Source)<br />
	at javax.swing.plaf.basic.BasicTextUI.paint(Unknown Source)<br />
	at javax.swing.plaf.basic.BasicTextUI.update(Unknown Source)<br />
	at javax.swing.JComponent.paintComponent(Unknown Source)<br />
	at javax.swing.JComponent.paint(Unknown Source)<br />
	at javax.swing.JComponent.paintToOffscreen(Unknown Source)<br />
	at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)<br />
	at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)<br />
	at javax.swing.RepaintManager.paint(Unknown Source)<br />
	at javax.swing.JComponent._paintImmediately(Unknown Source)<br />
	at javax.swing.JComponent.paintImmediately(Unknown Source)<br />
	at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)<br />
	at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)<br />
	at javax.swing.RepaintManager.prePaintDirtyRegions(Unknown Source)<br />
	at javax.swing.RepaintManager.access$700(Unknown Source)<br />
	at javax.swing.RepaintManager$ProcessingRunnable.run(Unknown Source)<br />
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)<br />
	at java.awt.EventQueue.dispatchEventImpl(Unknown Source)<br />
	at java.awt.EventQueue.access$200(Unknown Source)<br />
	at java.awt.EventQueue$3.run(Unknown Source)<br />
	at java.awt.EventQueue$3.run(Unknown Source)<br />
	at java.security.AccessController.doPrivileged(Native Method)<br />
	at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)<br />
	at java.awt.EventQueue.dispatchEvent(Unknown Source)<br />
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)<br />
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)<br />
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)<br />
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)<br />
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)<br />
	at java.awt.EventDispatchThread.run(Unknown Source)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: David M		</title>
		<link>https://undocumentedmatlab.com/articles/editbox-data-input-validation#comment-345602</link>

		<dc:creator><![CDATA[David M]]></dc:creator>
		<pubDate>Sat, 14 Feb 2015 21:44:50 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=4229#comment-345602</guid>

					<description><![CDATA[For anyone interested in limiting the contents of the editbox in real-time, I recommend using the MaskFormatter wrapped in a JFormattedtextField. Here is an example for a 5 digit zip-code:

&lt;pre lang=&quot;matlab&quot;&gt;
jMaskFormatter = javax.swing.text.MaskFormatter(&#039;#####&#039;);
jFormattedTextField = javax.swing.JFormattedTextField(jMaskFormatter);
javacomponent(jFormattedTextField,[10,10,120,25],gcf);
&lt;/pre&gt;

Info on the MaskFormatter class can be found here:

http://docs.oracle.com/javase/7/docs/api/javax/swing/text/MaskFormatter.html]]></description>
			<content:encoded><![CDATA[<p>For anyone interested in limiting the contents of the editbox in real-time, I recommend using the MaskFormatter wrapped in a JFormattedtextField. Here is an example for a 5 digit zip-code:</p>
<pre lang="matlab">
jMaskFormatter = javax.swing.text.MaskFormatter('#####');
jFormattedTextField = javax.swing.JFormattedTextField(jMaskFormatter);
javacomponent(jFormattedTextField,[10,10,120,25],gcf);
</pre>
<p>Info on the MaskFormatter class can be found here:</p>
<p><a href="http://docs.oracle.com/javase/7/docs/api/javax/swing/text/MaskFormatter.html" rel="nofollow ugc">http://docs.oracle.com/javase/7/docs/api/javax/swing/text/MaskFormatter.html</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Listbox layout customization &#124; Undocumented Matlab		</title>
		<link>https://undocumentedmatlab.com/articles/editbox-data-input-validation#comment-295167</link>

		<dc:creator><![CDATA[Listbox layout customization &#124; Undocumented Matlab]]></dc:creator>
		<pubDate>Wed, 13 Nov 2013 20:08:41 +0000</pubDate>
		<guid isPermaLink="false">http://undocumentedmatlab.com/?p=4229#comment-295167</guid>

					<description><![CDATA[[...] written on listboxes in a long while, and since I&#8217;ve recently posted on related controls (editbox, combo-box), I thought of following up with an article on customizing Matlab listbox layout. By the [...]]]></description>
			<content:encoded><![CDATA[<p>[&#8230;] written on listboxes in a long while, and since I&#8217;ve recently posted on related controls (editbox, combo-box), I thought of following up with an article on customizing Matlab listbox layout. By the [&#8230;]</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
