<?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 maximum number of characters in JTextField</title>
	<atom:link href="http://www.andrels.com/wp-en_US/index.php/2009/09/setting-maximum-number-of-characters-in-jtextfield/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.andrels.com/wp-en_US/index.php/2009/09/setting-maximum-number-of-characters-in-jtextfield/#utm_source=feed&#038;utm_medium=feed&#038;utm_campaign=feed</link>
	<description>Softwares Development, Technology and Games</description>
	<lastBuildDate>Tue, 31 Jan 2012 17:27:40 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: André</title>
		<link>http://www.andrels.com/wp-en_US/index.php/2009/09/setting-maximum-number-of-characters-in-jtextfield/comment-page-1/#comment-598</link>
		<dc:creator>André</dc:creator>
		<pubDate>Fri, 03 Sep 2010 19:20:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.andrels.com/wp-en_US/?p=73#comment-598</guid>
		<description>Thanks. This was fixed! But I changed the &quot;IF&quot; clause to insert the String part only if total length does not exceed the allowed length.</description>
		<content:encoded><![CDATA[<p>Thanks. This was fixed! But I changed the &#8220;IF&#8221; clause to insert the String part only if total length does not exceed the allowed length.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Java Java</title>
		<link>http://www.andrels.com/wp-en_US/index.php/2009/09/setting-maximum-number-of-characters-in-jtextfield/comment-page-1/#comment-589</link>
		<dc:creator>Java Java</dc:creator>
		<pubDate>Tue, 31 Aug 2010 03:05:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.andrels.com/wp-en_US/?p=73#comment-589</guid>
		<description>Thanks for your best turotial. 
But I suggest you must use &quot;str = null;&quot; instead of &quot;str = str.substring(0, maxChars);&quot;. Because a run time error occurs when we use more than maxChars.</description>
		<content:encoded><![CDATA[<p>Thanks for your best turotial.<br />
But I suggest you must use &#8220;str = null;&#8221; instead of &#8220;str = str.substring(0, maxChars);&#8221;. Because a run time error occurs when we use more than maxChars.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: M.sh</title>
		<link>http://www.andrels.com/wp-en_US/index.php/2009/09/setting-maximum-number-of-characters-in-jtextfield/comment-page-1/#comment-566</link>
		<dc:creator>M.sh</dc:creator>
		<pubDate>Fri, 13 Aug 2010 23:10:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.andrels.com/wp-en_US/?p=73#comment-566</guid>
		<description>Thank you , Good Job

but i have a note that
                                       if((getLength() + str.length() &lt;= maxChars))
				        {
				            super.insertString(offs, str, a);
				        }
this condition is enough and i try it

thanks</description>
		<content:encoded><![CDATA[<p>Thank you , Good Job</p>
<p>but i have a note that<br />
                                       if((getLength() + str.length() &lt;= maxChars))<br />
				        {<br />
				            super.insertString(offs, str, a);<br />
				        }<br />
this condition is enough and i try it</p>
<p>thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: André</title>
		<link>http://www.andrels.com/wp-en_US/index.php/2009/09/setting-maximum-number-of-characters-in-jtextfield/comment-page-1/#comment-533</link>
		<dc:creator>André</dc:creator>
		<pubDate>Thu, 08 Jul 2010 13:24:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.andrels.com/wp-en_US/?p=73#comment-533</guid>
		<description>Sorry, my mistake.

The correct operator is &quot;!=&quot;, not &quot;==&quot;. You should to use &quot;str != null&quot; because if str is null &quot;str.length()&quot; will throw NullPointerException.

Thanks for notice!</description>
		<content:encoded><![CDATA[<p>Sorry, my mistake.</p>
<p>The correct operator is &#8220;!=&#8221;, not &#8220;==&#8221;. You should to use &#8220;str != null&#8221; because if str is null &#8220;str.length()&#8221; will throw NullPointerException.</p>
<p>Thanks for notice!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MoCsa</title>
		<link>http://www.andrels.com/wp-en_US/index.php/2009/09/setting-maximum-number-of-characters-in-jtextfield/comment-page-1/#comment-532</link>
		<dc:creator>MoCsa</dc:creator>
		<pubDate>Thu, 08 Jul 2010 10:53:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.andrels.com/wp-en_US/?p=73#comment-532</guid>
		<description>str==null why str=str.subString(0.....
I try it but wrong...

if (getLength() + str.length() &gt; limit) {
            str = str.substring(0, limit - getLength());

it&#039;s worked

and create setMaxChars(int MaxChars) metod ofcourse</description>
		<content:encoded><![CDATA[<p>str==null why str=str.subString(0&#8230;..<br />
I try it but wrong&#8230;</p>
<p>if (getLength() + str.length() &gt; limit) {<br />
            str = str.substring(0, limit &#8211; getLength());</p>
<p>it&#8217;s worked</p>
<p>and create setMaxChars(int MaxChars) metod ofcourse</p>
]]></content:encoded>
	</item>
</channel>
</rss>

