<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>

<channel>
	<title>Randomly Intermittent Thoughts</title>
	<atom:link href="http://www.nathanblomquist.net/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nathanblomquist.net/blog</link>
	<description>Thoughts I have pondered, but may not be wholely original...</description>
	<pubDate>Tue, 16 Oct 2007 20:54:41 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
	<language>en</language>
			<item>
		<title>Reverse an Array in Place</title>
		<link>http://www.nathanblomquist.net/blog/2007/10/15/reverse-an-array-in-place/</link>
		<comments>http://www.nathanblomquist.net/blog/2007/10/15/reverse-an-array-in-place/#comments</comments>
		<pubDate>Tue, 16 Oct 2007 03:02:59 +0000</pubDate>
		<dc:creator>nblom</dc:creator>
		
		<category><![CDATA[Java]]></category>

		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.nathanblomquist.net/blog/2007/10/15/reverse-an-array-in-place/</guid>
		<description><![CDATA[I was just looking through some code.  I noticed that an array needed to be reversed and that the original order was never needed again.  This was a perfect time to reverse the array in place.  This was Java so I looked in the Arrays class.  But alas there wasn't a [...]]]></description>
			<content:encoded><![CDATA[<p>I was just looking through some code.  I noticed that an array needed to be reversed and that the original order was never needed again.  This was a perfect time to reverse the array in place.  This was Java so I looked in the <a href="http://java.sun.com/javase/6/docs/api/java/util/Arrays.html">Arrays</a> class.  But alas there wasn't a reverse for primitive arrays!  Java <a href="http://java.sun.com/javase/6/docs/api/java/util/Collections.html#reverse(java.util.List)">Lists get a reverse method</a> in the <a href="http://java.sun.com/javase/6/docs/api/java/util/Collections.html">Collections</a> class.  But primitive arrays get no such love.</p>
<p>Also, I thought of using the <a href="http://java.sun.com/javase/6/docs/api/java/util/Arrays.html#asList(T...)">asList</a> method from <a href="http://java.sun.com/javase/6/docs/api/java/util/Arrays.html">Arrays</a>, but that just seems like a ton of overhead.</p>
<p>So instead I wrote a quick little method for ints and any other primitive type.</p>
<p>Here is the int example:</p>
<div class="igBar"><span id="ljava-2"><a href="#" onclick="javascript:showPlainTxt('java-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span>
<div id="java-2">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">static</span> <span style="color: #993333;">void</span> reverseInPlace<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">int</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> iar<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #993333;">int</span> length = iar.<span style="color: #006600;">length</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #993333;">int</span> halfLength = length / <span style="color: #cc66cc;color:#800000;">2</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #993333;">int</span> lengthMinus1 = length - <span style="color: #cc66cc;color:#800000;">1</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #993333;">int</span> i = <span style="color: #cc66cc;color:#800000;">0</span>; i &lt;halfLength; ++i<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">final</span> <span style="color: #993333;">int</span> index2 = lengthMinus1 - i;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #808080; font-style: italic;">//swap</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #993333;">int</span> tmp = iar<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; iar<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span> = iar<span style="color: #66cc66;">&#91;</span>index2<span style="color: #66cc66;">&#93;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; iar<span style="color: #66cc66;">&#91;</span>index2<span style="color: #66cc66;">&#93;</span> = tmp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Basically, this method just swaps the items from the front to back until reaching the middle of the array.  If the loop continued on, it would just switch everything back and the original order would be preserved!</p>
<p>The other implementations for the rest of the primitive types can be found <a href="http://nathanblomquist.net/websvn/filedetails.php?repname=NDB+Repo&#038;path=%2Ftrunk%2FNBUtil%2Fsrc%2Fnb%2Futil%2FArrayUtils.java">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nathanblomquist.net/blog/2007/10/15/reverse-an-array-in-place/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Yet Another Reason to Love Process Explorer — Part 2</title>
		<link>http://www.nathanblomquist.net/blog/2007/10/12/yet-another-reason-to-love-process-explorer-%e2%80%94-part-2/</link>
		<comments>http://www.nathanblomquist.net/blog/2007/10/12/yet-another-reason-to-love-process-explorer-%e2%80%94-part-2/#comments</comments>
		<pubDate>Fri, 12 Oct 2007 20:27:46 +0000</pubDate>
		<dc:creator>nblom</dc:creator>
		
		<category><![CDATA[Process Explorer]]></category>

		<category><![CDATA[Utilities]]></category>

		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.nathanblomquist.net/blog/2007/10/12/yet-another-reason-to-love-process-explorer-%e2%80%94-part-2/</guid>
		<description><![CDATA[This is a bit different from my last post about Process Explorer.  Process Explorer is so powerful that I accidentally killed a different process than I wanted. This wasn't through some fancy schmancy search with regular expressions and kill accident.  I just highlighted a process and clicked the .
I then proceeded to click [...]]]></description>
			<content:encoded><![CDATA[<p>This is a bit different from my last post about Process Explorer.  Process Explorer is so powerful that I accidentally killed a different process than I wanted. This wasn't through some fancy schmancy search with regular expressions and kill accident.  I just highlighted a process and clicked the <img src='http://www.nathanblomquist.net/blog/wp-content/uploads/2007/10/pe_red_x.PNG' alt='Process Explorer Red X' alt="Process Explorer Red X" />.</p>
<p>I then proceeded to click 'Yes' on the simple dialog: <img src='http://www.nathanblomquist.net/blog/wp-content/uploads/2007/10/pe_are_you_sure_want_to_kill_xxxx.PNG' alt='pe_are_you_sure_want_to_kill_xxxx.PNG' />.</p>
<p>Notice the blackened out word at the end of the Dialog's text?  Well that is essentially what my brain did when I read that dialog.</p>
<p>So, long story short I killed the wrong process.  Nothing seemed to break for a few hours.  Then when I went to debug a couple of things, I wasn't able to connect to a service that was supposed to be running.  I restarted somethings on my end, then remembered, "Oh yeah, I killed a random process earlier."  I restarted the killed service and lo and behold everything started working again.</p>
<p><strong>Lesson learned here kids:</strong> <em>Don't kill random processes and then wonder why stuff breaks!</em></p>
<p><a href="http://www.microsoft.com/technet/sysinternals/ProcessesAndThreads/ProcessExplorer.mspx">Process Explorer</a> is part of the <a href="http://www.microsoft.com/technet/sysinternals/default.mspx">Microsoft Sysinternals</a> set of utilities.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nathanblomquist.net/blog/2007/10/12/yet-another-reason-to-love-process-explorer-%e2%80%94-part-2/feed/</wfw:commentRss>
		</item>
		<item>
		<title>onbeforeunload IE7 Woes!</title>
		<link>http://www.nathanblomquist.net/blog/2007/10/12/onbeforeunload-ie7-woes/</link>
		<comments>http://www.nathanblomquist.net/blog/2007/10/12/onbeforeunload-ie7-woes/#comments</comments>
		<pubDate>Fri, 12 Oct 2007 19:40:39 +0000</pubDate>
		<dc:creator>nblom</dc:creator>
		
		<category><![CDATA[Javascript]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.nathanblomquist.net/blog/2007/10/12/onbeforeunload-ie7-woes/</guid>
		<description><![CDATA[Was just having a problem getting the IE7 onbeforeunload event to be canceled.  Found this blog about it:  OnBeforeUnload, IE7, Assigning event handlers to null and the problems that arise.
Pretty simple, just wrap the return with a boolean:
PLAIN TEXT
JAVASCRIPT:




var goodExit = false;


window.onbeforeunload = confirmExit;


function confirmExit&#40;&#41;


&#123;


&#160; // normally this if-check wouldn't be here,


&#160; // [...]]]></description>
			<content:encoded><![CDATA[<p>Was just having a problem getting the IE7 onbeforeunload event to be canceled.  Found this blog about it:  <a href="http://bustedmug.blogspot.com/2007/01/onbeforeunload-ie7-assigning-event.html">OnBeforeUnload, IE7, Assigning event handlers to null and the problems that arise</a>.</p>
<p>Pretty simple, just wrap the return with a boolean:</p>
<div class="igBar"><span id="ljavascript-4"><a href="#" onclick="javascript:showPlainTxt('javascript-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-4">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">var</span> goodExit = <span style="color: #003366; font-weight: bold;">false</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">window.<span style="color: #006600;">onbeforeunload</span> = confirmExit;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">function</span> confirmExit<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900; font-style: italic;">// normally this if-check wouldn't be here,</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900; font-style: italic;">// cause the event handler was nulled elsewhere.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900; font-style: italic;">// But IE7 doesn't respect the null, and</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900; font-style: italic;">// wants the handler to not return anything</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900; font-style: italic;">// (not even null).</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>!goodExit<span style="color: #66cc66;">&#41;</span> </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #3366CC;">"Leaving this page will cause all unplaced orders to be discarded."</span>+</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #3366CC;">"&nbsp; Are you sure you want to leave the page?"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #009900; font-style: italic;">// notice no return statement here!</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;/script&gt;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; . . . . . </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;input type=<span style="color: #3366CC;">"image"</span> src=<span style="color: #3366CC;">"&lt;%=AppService.BASEDIR%&gt;/images/lgrequest.gif"</span> onclick=<span style="color: #3366CC;">"javascript: goodExit = true; window.onbeforeunload = null; document.forms[0].submit();"</span> /&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>This example was stolen from Brandon Himes and his blog, <a href="http://bustedmug.blogspot.com/">The Busted Mug</a>.  Thank you Brandon!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nathanblomquist.net/blog/2007/10/12/onbeforeunload-ie7-woes/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Yet Another Reason to Love Process Explorer &#8212; Part 1</title>
		<link>http://www.nathanblomquist.net/blog/2007/10/08/yet-another-reason-to-love-process-explorer-part-1/</link>
		<comments>http://www.nathanblomquist.net/blog/2007/10/08/yet-another-reason-to-love-process-explorer-part-1/#comments</comments>
		<pubDate>Mon, 08 Oct 2007 15:26:41 +0000</pubDate>
		<dc:creator>nblom</dc:creator>
		
		<category><![CDATA[Process Explorer]]></category>

		<category><![CDATA[Utilities]]></category>

		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.nathanblomquist.net/blog/2007/10/08/yet-another-reason-to-love-process-explorer-part-1/</guid>
		<description><![CDATA[Well, I just found another reason to love Process Explorer here: How To Identify What Programs Started svchost.exe in Windows.
This article describes how to use the command line and/or Process Explorer to find out what the hell svchost.exe is doing.
Open a command prompt and enter:
tasklist /svc /FI "IMAGENAME eq svchost.exe"
The above command will list all [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I just found another reason to love Process Explorer here: <a href="http://www.watchingthenet.com/how-to-identify-what-programs-started-svchostexe-in-windows.html">How To Identify What Programs Started svchost.exe in Windows</a>.</p>
<p>This article describes how to use the command line and/or Process Explorer to find out what the hell svchost.exe is doing.</p>
<blockquote><p>Open a command prompt and enter:</p>
<p>tasklist /svc /FI "IMAGENAME eq svchost.exe"</p>
<p>The above command will list all the svchost.exe processes and display the programs (DLL's) that have been started by svchost.exe.</p></blockquote>
<p><a href="http://www.microsoft.com/technet/sysinternals/ProcessesAndThreads/ProcessExplorer.mspx">Process Explorer</a> is part of the <a href="http://www.microsoft.com/technet/sysinternals/default.mspx">Microsoft Sysinternals</a> set of utilities.</p>
<p>Hopefully, this will become a series of posts.  We'll see!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nathanblomquist.net/blog/2007/10/08/yet-another-reason-to-love-process-explorer-part-1/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A Good Reasoning to Nullify an Object!</title>
		<link>http://www.nathanblomquist.net/blog/2007/10/05/a-good-reasoning-to-nullify-an-object/</link>
		<comments>http://www.nathanblomquist.net/blog/2007/10/05/a-good-reasoning-to-nullify-an-object/#comments</comments>
		<pubDate>Fri, 05 Oct 2007 20:33:04 +0000</pubDate>
		<dc:creator>nblom</dc:creator>
		
		<category><![CDATA[Java]]></category>

		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.nathanblomquist.net/blog/2007/10/05/a-good-reasoning-to-nullify-an-object/</guid>
		<description><![CDATA[If you overwrite a reference with a new object, the object is first created and /then/ the reference is overwritten, which means the object can be only GCed /after/ the new object has been created.
Usually this doesn’t matter. However, if you want to overwrite an object which is so big that it only fits once [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>If you overwrite a reference with a new object, the object is first created and /then/ the reference is overwritten, which means the object can be only GCed /after/ the new object has been created.</p>
<p>Usually this doesn’t matter. However, if you want to overwrite an object which is so big that it only fits once into the memory, you’ll need to null the reference before creating/assigning the new instance.</p>
<p>Eg:</p>
<p>//FatObject fits only once into memory<br />
FatObject fatty;<br />
fatty=new FatObject();<br />
fatty=new FatObject();</p>
<p>Will bomb with OOME. Whereas…</p>
<p>FatObject fatty;<br />
fatty=new FatObject();<br />
fatty=null;<br />
fatty=new FatObject();</p>
<p>Will be fine, because the second creation of the FatObject will trigger a full GC and the GC will be able to clear enough memory (since the old reference has been nulled).</p>
<p>Well, that rarely matters, but it’s good to know. </p></blockquote>
<p> Jos Hirth wrote this in response to this <a href="http://blog.xebia.com/2007/10/04/leaking-memory-in-java/">post</a> by Jeroen van Erp.</p>
<p>In this post, Jeroen was talking about a long standing bug/issue/misunderstanding of how Strings are handled in Java.  The problem that occurs only comes up when taking a substring of a large String.  If all that is wanted is the small substring, the substring must be wrapped by a new String call.  This will allow the larger String to be garbage collected.  Normally when a substring is taken, the underlying char array is shared.  This is usually good practice, because it <em>saves</em> memory.</p>
<p>But, and this is a big <strong>but</strong>, if the substring is taken from a large string, then memory can be leaked, because a lot of memory is wasted in the underlying character array.</p>
<p>Now, why did I quote the above passage from the comment area?  Cause I had never thought of the issue Jos brought up.  It's interesting to think of an object of which only one can fit in memory. Let alone creating a second!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nathanblomquist.net/blog/2007/10/05/a-good-reasoning-to-nullify-an-object/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Wow, it&#8217;s been a long time!</title>
		<link>http://www.nathanblomquist.net/blog/2007/10/05/wow-its-been-a-long-time/</link>
		<comments>http://www.nathanblomquist.net/blog/2007/10/05/wow-its-been-a-long-time/#comments</comments>
		<pubDate>Fri, 05 Oct 2007 20:32:17 +0000</pubDate>
		<dc:creator>nblom</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.nathanblomquist.net/blog/2007/10/05/wow-its-been-a-long-time/</guid>
		<description><![CDATA[I haven't really posted in here for a long time.
But I think I am going to try to more. I want to turn this into a place where I take snippets of blogs or articles and place the relevant parts here.  Keeping the links in this blog with the snippets will help me remember [...]]]></description>
			<content:encoded><![CDATA[<p>I haven't really posted in here for a long time.</p>
<p>But I think I am going to try to more. I want to turn this into a place where I take snippets of blogs or articles and place the relevant parts here.  Keeping the links in this blog with the snippets will help me remember things.  If the page disappears, well then at least I have this snippet!</p>
<p>(that is as long as this blog lives)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nathanblomquist.net/blog/2007/10/05/wow-its-been-a-long-time/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Information Addiction</title>
		<link>http://www.nathanblomquist.net/blog/2006/07/15/information-addiction/</link>
		<comments>http://www.nathanblomquist.net/blog/2006/07/15/information-addiction/#comments</comments>
		<pubDate>Sun, 16 Jul 2006 05:35:26 +0000</pubDate>
		<dc:creator>nblom</dc:creator>
		
		<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://www.nathanblomquist.net/blog/2006/07/15/information-addiction/</guid>
		<description><![CDATA[I have come to the realization that I must be addicted to information.  If I am not actively involved in something like work, gaming, or watching TV, I have to be reading.  It doesn't matter what.
I could be reading an article about Paris Hilton's latest escapades in the night life of LA.  [...]]]></description>
			<content:encoded><![CDATA[<p>I have come to the realization that I must be addicted to information.  If I am not actively involved in something like work, gaming, or watching TV, I have to be reading.  It doesn't matter what.</p>
<p>I could be reading an article about Paris Hilton's latest escapades in the night life of LA.  I could be reading an article about the coming processor war between AMD and Intel, and how they are competing for my hard earned cash.  I could be reading a book about quantum physics and how the universe is really just a huge quantum computer.</p>
<p>I am not a big Mac fan, yet I read technical articles on its inner workings.  Why do I do this?  It doesn't help me with my day to day job.  I don't have a Mac to tweak.</p>
<p>I read quantum physics books because I think it is cool to say, "I read a quantum physics book last week" (also I like the <i>weirdness</i> that is the submicroscopic realm).</p>
<p>Can the human mind process all this <i>data</i> into anything relevant?  After all these articles are read, do I gain anything?  Do I actually extract <i>information</i>?</p>
<p>I have actually caught my self feeling somewhat at a loss, when I go to my custom Google homepage and notice that I have read all the articles currently there.  I am like "what do I do now?"  Where do I find more stuff to read to fill this urge?</p>
<p>Why do I fill my brain with all this stuff?  Can the brain actually fill up?  Am I actually discarding things?  Should I remember something that is now replaced by the latest antics of Tom Cruise?  I hope I haven't lost anything important.</p>
<p>I am addicted to information...</p>
<p>Admitting it is half the battle, right?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nathanblomquist.net/blog/2006/07/15/information-addiction/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Rites of Passage</title>
		<link>http://www.nathanblomquist.net/blog/2006/07/05/rites-of-passage/</link>
		<comments>http://www.nathanblomquist.net/blog/2006/07/05/rites-of-passage/#comments</comments>
		<pubDate>Wed, 05 Jul 2006 23:32:10 +0000</pubDate>
		<dc:creator>nblom</dc:creator>
		
		<category><![CDATA[Life]]></category>

		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.nathanblomquist.net/blog/2006/07/05/rites-of-passage/</guid>
		<description><![CDATA[I was watching a TV show the other day.  A girl was about to have her 13th birthday.  This seems reasonable for a TV show to have.
The thing that caught my attention was the girl asked for a progression of things:
Girl:  Can I get a cell phone?
Parents: No.
Girl: Can I get a [...]]]></description>
			<content:encoded><![CDATA[<p>I was watching a TV show the other day.  A girl was about to have her 13th birthday.  This seems reasonable for a TV show to have.</p>
<p>The thing that caught my attention was the girl asked for a progression of things:</p>
<p><em><strong>Girl:</strong>  Can I get a cell phone?<br />
<strong>Parents:</strong> No.</p>
<p><strong>Girl:</strong> Can I get a pager (why anyone would want this in todays age is anyone's guess)?<br />
<strong>Parents:</strong> No.</p>
<p><strong>Girl:</strong> Can I at least get a computer in my bed room?<br />
<strong>Parents:</strong> No.</p>
<p><strong>Girl:</strong> Well, then could I get my own email address?<br />
<strong>Parents:</strong> Well, we'll think about it.</p>
<p>... time in show progresses ...</p>
<p><strong>Parents:</strong>  Ok, you'll get your own email account, but we'll have the password and can check on any emails sent/received/deleted.<br />
<strong>Girl (all giddy and overflowing with delight):</strong> Yay, this is the best birthday ever.</em></p>
<p>My question is:  When did getting an email change into a Rite of Passage for young girls and/or boys.  I can understand the parents wanting full access, but why is the girl giddy?</p>
<p>What happened to cars (or just even driving) being the main Rite of Passage?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nathanblomquist.net/blog/2006/07/05/rites-of-passage/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Changing the Color of a JCheckBox check in a JTable</title>
		<link>http://www.nathanblomquist.net/blog/2006/06/27/changing-the-color-of-a-jcheckbox-check-in-a-jtable/</link>
		<comments>http://www.nathanblomquist.net/blog/2006/06/27/changing-the-color-of-a-jcheckbox-check-in-a-jtable/#comments</comments>
		<pubDate>Tue, 27 Jun 2006 23:53:13 +0000</pubDate>
		<dc:creator>nblom</dc:creator>
		
		<category><![CDATA[Java]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.nathanblomquist.net/blog/2006/06/27/changing-the-color-of-a-jcheckbox-check-in-a-jtable/</guid>
		<description><![CDATA[Ever wanted to change the color of a JCheckBox in a JTable to the table's foreground color?  Now you can!
Example Screenshot:

This is a renderer for Booleans in a JTable.
PLAIN TEXT
JAVA:




import java.awt.Color;


import java.awt.Component;


import java.awt.Graphics;


&#160;


import javax.swing.JCheckBox;


import javax.swing.JTable;


import javax.swing.table.TableCellRenderer;


&#160;


/**


* This class implements a boolean renderer for a JTable.&#160; It overrides the icon for the CheckBox to draw [...]]]></description>
			<content:encoded><![CDATA[<p>Ever wanted to change the color of a JCheckBox in a JTable to the table's foreground color?  Now you can!</p>
<p>Example Screenshot:<br />
<img id="image11" src="http://www.nathanblomquist.net/blog/wp-content/uploads/2006/06/booleanRendererComparison.jpg" alt="Lower Table has a white check instead of a black check!" /></p>
<p>This is a renderer for Booleans in a JTable.</p>
<div class="igBar"><span id="ljava-8"><a href="#" onclick="javascript:showPlainTxt('java-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span>
<div id="java-8">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import java.awt.Color;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import java.awt.Component;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import java.awt.Graphics;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import javax.swing.JCheckBox;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import javax.swing.JTable;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import javax.swing.table.TableCellRenderer;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/**</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">* This class implements a boolean renderer for a JTable.&nbsp; It overrides the icon for the CheckBox to draw in the</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">* foreground color.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">*/</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> BooleanRenderer <span style="color: #000000; font-weight: bold;">extends</span> <a href="http://www.google.com/search?q=allinurl%3AJCheckBox+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">JCheckBox</span></a> <span style="color: #000000; font-weight: bold;">implements</span> <a href="http://www.google.com/search?q=allinurl%3ATableCellRenderer+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">TableCellRenderer</span></a> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">public</span> BooleanRenderer<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;super<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;setHorizontalAlignment<span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AJCheckBox+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">JCheckBox</span></a>.<span style="color: #006600;">CENTER</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;setIcon<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> ColorableMetalCheckBoxIcon<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?q=allinurl%3AComponent+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Component</span></a> getTableCellRendererComponent<span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AJTable+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">JTable</span></a> table, <a href="http://www.google.com/search?q=allinurl%3AObject+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> value,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333;">boolean</span> isSelected, <span style="color: #993333;">boolean</span> hasFocus, <span style="color: #993333;">int</span> row, <span style="color: #993333;">int</span> column<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>isSelected<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;setForeground<span style="color: #66cc66;">&#40;</span>table.<span style="color: #006600;">getSelectionForeground</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;super.<span style="color: #006600;">setBackground</span><span style="color: #66cc66;">&#40;</span>table.<span style="color: #006600;">getSelectionBackground</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;setForeground<span style="color: #66cc66;">&#40;</span>table.<span style="color: #006600;">getForeground</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;setBackground<span style="color: #66cc66;">&#40;</span>table.<span style="color: #006600;">getBackground</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;setSelected<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>value != <span style="color: #000000; font-weight: bold;">null</span> &amp;&amp; <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3ABoolean+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Boolean</span></a><span style="color: #66cc66;">&#41;</span> value<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">booleanValue</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">this</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #808080; font-style: italic;">/**</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp; &nbsp; * Changes the check box check mark to be the foreground color.&lt;br/&gt;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp; &nbsp; * &lt;b&gt;NOTE:&lt;/b&gt;This was found here http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4449413 .</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">&nbsp; &nbsp; */</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #993333;">static</span> <span style="color: #000000; font-weight: bold;">class</span> ColorableMetalCheckBoxIcon <span style="color: #000000; font-weight: bold;">extends</span> javax.<span style="color: #006600;">swing</span>.<span style="color: #006600;">plaf</span>.<span style="color: #006600;">metal</span>.<a href="http://www.google.com/search?q=allinurl%3AMetalCheckBoxIcon+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">MetalCheckBoxIcon</span></a> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #993333;">void</span> drawCheck<span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AComponent+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Component</span></a> c, <a href="http://www.google.com/search?q=allinurl%3AGraphics+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Graphics</span></a> g, <span style="color: #993333;">int</span> x, <span style="color: #993333;">int</span> y<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">final</span> <a href="http://www.google.com/search?q=allinurl%3AColor+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Color</span></a> old = g.<span style="color: #006600;">getColor</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;g.<span style="color: #006600;">setColor</span><span style="color: #66cc66;">&#40;</span>c.<span style="color: #006600;">getForeground</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;super.<span style="color: #006600;">drawCheck</span><span style="color: #66cc66;">&#40;</span>c, g, x, y<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;g.<span style="color: #006600;">setColor</span><span style="color: #66cc66;">&#40;</span>old<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>This is the corresponding Editor.</p>
<div class="igBar"><span id="ljava-9"><a href="#" onclick="javascript:showPlainTxt('java-9'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span>
<div id="java-9">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import java.awt.Component;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import javax.swing.DefaultCellEditor;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import javax.swing.JCheckBox;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import javax.swing.JTable;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/**</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">* This class implements a boolean editor for a JTable.&nbsp; It overrides the icon for the CheckBox to draw in the</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">* foreground color.</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">*/</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> BooleanEditor <span style="color: #000000; font-weight: bold;">extends</span> <a href="http://www.google.com/search?q=allinurl%3ADefaultCellEditor+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">DefaultCellEditor</span></a> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">public</span> BooleanEditor<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;super<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=allinurl%3AJCheckBox+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">JCheckBox</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.google.com/search?q=allinurl%3AJCheckBox+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">JCheckBox</span></a> c = <span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AJCheckBox+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">JCheckBox</span></a><span style="color: #66cc66;">&#41;</span> getComponent<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;c.<span style="color: #006600;">setHorizontalAlignment</span><span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AJCheckBox+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">JCheckBox</span></a>.<span style="color: #006600;">CENTER</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;c.<span style="color: #006600;">setIcon</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> BooleanRenderer.<span style="color: #006600;">ColorableMetalCheckBoxIcon</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?q=allinurl%3AComponent+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Component</span></a> getTableCellEditorComponent<span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AJTable+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">JTable</span></a> table,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3AObject+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> value,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333;">boolean</span> isSelected,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333;">int</span> row,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #993333;">int</span> column<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;<a href="http://www.google.com/search?q=allinurl%3AJCheckBox+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">JCheckBox</span></a> c = <span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AJCheckBox+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">JCheckBox</span></a><span style="color: #66cc66;">&#41;</span> getComponent<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>isSelected<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;c.<span style="color: #006600;">setForeground</span><span style="color: #66cc66;">&#40;</span>table.<span style="color: #006600;">getSelectionForeground</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;c.<span style="color: #006600;">setBackground</span><span style="color: #66cc66;">&#40;</span>table.<span style="color: #006600;">getSelectionBackground</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;c.<span style="color: #006600;">setForeground</span><span style="color: #66cc66;">&#40;</span>table.<span style="color: #006600;">getForeground</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;c.<span style="color: #006600;">setBackground</span><span style="color: #66cc66;">&#40;</span>table.<span style="color: #006600;">getBackground</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;c.<span style="color: #006600;">setSelected</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>value != <span style="color: #000000; font-weight: bold;">null</span> &amp;&amp; <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3ABoolean+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Boolean</span></a><span style="color: #66cc66;">&#41;</span> value<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">booleanValue</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000000; font-weight: bold;">return</span> c;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Quick and Dirty Tester Program!</p>
<div class="igBar"><span id="ljava-10"><a href="#" onclick="javascript:showPlainTxt('java-10'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVA:</span>
<div id="java-10">
<div class="java">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import java.awt.Color;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import java.awt.Dimension;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import java.awt.FlowLayout;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import javax.swing.*;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import javax.swing.table.AbstractTableModel;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #a1a100;">import javax.swing.table.DefaultTableModel;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">/**</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> * shows how to use the BooleanEditor and the BooleanRenderer.</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"> */</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> JTableBooleanTester <span style="color: #000000; font-weight: bold;">extends</span> <a href="http://www.google.com/search?q=allinurl%3AJFrame+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">JFrame</span></a><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> JTableBooleanTester<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; setDefaultCloseOperation<span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AJFrame+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">JFrame</span></a>.<span style="color: #006600;">EXIT_ON_CLOSE</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3ADimension+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Dimension</span></a> dim = <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=allinurl%3ADimension+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Dimension</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">200</span>,<span style="color: #cc66cc;color:#800000;">75</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; TestTableModel ttm = <span style="color: #000000; font-weight: bold;">new</span> TestTableModel<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3AJTable+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">JTable</span></a> table1 = <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=allinurl%3AJTable+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">JTable</span></a><span style="color: #66cc66;">&#40;</span>ttm<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; table1.<span style="color: #006600;">setForeground</span><span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AColor+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Color</span></a>.<span style="color: #006600;">WHITE</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; table1.<span style="color: #006600;">setBackground</span><span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AColor+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Color</span></a>.<span style="color: #006600;">DARK_GRAY</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3AJScrollPane+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">JScrollPane</span></a> sp1 = <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=allinurl%3AJScrollPane+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">JScrollPane</span></a><span style="color: #66cc66;">&#40;</span>table1<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; sp1.<span style="color: #006600;">setPreferredSize</span><span style="color: #66cc66;">&#40;</span>dim<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3AJTable+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">JTable</span></a> table2 = <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=allinurl%3AJTable+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">JTable</span></a><span style="color: #66cc66;">&#40;</span>ttm<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; table2.<span style="color: #006600;">setForeground</span><span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AColor+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Color</span></a>.<span style="color: #006600;">WHITE</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; table2.<span style="color: #006600;">setBackground</span><span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AColor+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Color</span></a>.<span style="color: #006600;">DARK_GRAY</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; table2.<span style="color: #006600;">setDefaultEditor</span><span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3ABoolean+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Boolean</span></a>.<span style="color: #000000; font-weight: bold;">class</span>, <span style="color: #000000; font-weight: bold;">new</span> BooleanEditor<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; table2.<span style="color: #006600;">setDefaultRenderer</span><span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3ABoolean+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Boolean</span></a>.<span style="color: #000000; font-weight: bold;">class</span>, <span style="color: #000000; font-weight: bold;">new</span> BooleanRenderer<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3AJScrollPane+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">JScrollPane</span></a> sp2 = <span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=allinurl%3AJScrollPane+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">JScrollPane</span></a><span style="color: #66cc66;">&#40;</span>table2<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; sp2.<span style="color: #006600;">setPreferredSize</span><span style="color: #66cc66;">&#40;</span>dim<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; getContentPane<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">setLayout</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=allinurl%3ABoxLayout+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">BoxLayout</span></a><span style="color: #66cc66;">&#40;</span>getContentPane<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>,<a href="http://www.google.com/search?q=allinurl%3ABoxLayout+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">BoxLayout</span></a>.<span style="color: #006600;">Y_AXIS</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; getContentPane<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">add</span><span style="color: #66cc66;">&#40;</span>sp1<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; getContentPane<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">add</span><span style="color: #66cc66;">&#40;</span>sp2<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; pack<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">static</span> <span style="color: #993333;">void</span> main<span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AString+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">String</span></a><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> args<span style="color: #66cc66;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <a href="http://www.google.com/search?q=allinurl%3AException+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Exception</span></a> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3AUIManager+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">UIManager</span></a>.<span style="color: #006600;">setLookAndFeel</span><span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AUIManager+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">UIManager</span></a>.<span style="color: #006600;">getSystemLookAndFeelClassName</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3ASwingUtilities+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">SwingUtilities</span></a>.<span style="color: #006600;">invokeLater</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <a href="http://www.google.com/search?q=allinurl%3ARunnable+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Runnable</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> run<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3AJFrame+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">JFrame</span></a> frame = <span style="color: #000000; font-weight: bold;">new</span> JTableBooleanTester<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; frame.<span style="color: #006600;">setVisible</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #993333;">static</span> <span style="color: #000000; font-weight: bold;">class</span> TestTableModel <span style="color: #000000; font-weight: bold;">extends</span> <a href="http://www.google.com/search?q=allinurl%3AAbstractTableModel+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">AbstractTableModel</span></a><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3AObject+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Object</span></a><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> data = <span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">&#123;</span><a href="http://www.google.com/search?q=allinurl%3ABoolean+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Boolean</span></a>.<span style="color: #000000; font-weight: bold;">TRUE</span>, <span style="color: #ff0000;">"Testing 1!"</span><span style="color: #66cc66;">&#125;</span>,<span style="color: #66cc66;">&#123;</span><a href="http://www.google.com/search?q=allinurl%3ABoolean+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Boolean</span></a>.<span style="color: #000000; font-weight: bold;">FALSE</span>,<span style="color: #ff0000;">"Testing 2!"</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#125;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?q=allinurl%3AObject+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Object</span></a><span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span> names = <span style="color: #66cc66;">&#123;</span><span style="color: #ff0000;">"Bool"</span>, <span style="color: #ff0000;">"Something!"</span><span style="color: #66cc66;">&#125;</span>; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">int</span> getRowCount<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> data.<span style="color: #006600;">length</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">int</span> getColumnCount<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> names.<span style="color: #006600;">length</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <a href="http://www.google.com/search?q=allinurl%3AObject+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> getValueAt<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">int</span> rowIndex, <span style="color: #993333;">int</span> columnIndex<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> data<span style="color: #66cc66;">&#91;</span>rowIndex<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span>columnIndex<span style="color: #66cc66;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">void</span> setValueAt<span style="color: #66cc66;">&#40;</span><a href="http://www.google.com/search?q=allinurl%3AObject+java.sun.com&amp;bntl=1"><span style="color: #aaaadd; font-weight: bold;">Object</span></a> aValue, <span style="color: #993333;">int</span> rowIndex, <span style="color: #993333;">int</span> columnIndex<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">switch</span><span style="color: #66cc66;">&#40;</span>columnIndex<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;color:#800000;">0</span>:</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; data<span style="color: #66cc66;">&#91;</span>rowIndex<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span>columnIndex<span style="color: #66cc66;">&#93;</span> = aValue;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fireTableDataChanged<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #993333;">boolean</span> isCellEditable<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">int</span> rowIndex, <span style="color: #993333;">int</span> columnIndex<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> <span style="color: #cc66cc;color:#800000;">0</span> == columnIndex; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">Class</span> getColumnClass<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">int</span> columnIndex<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">return</span> data<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;color:#800000;">0</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span>columnIndex<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">getClass</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.nathanblomquist.net/blog/2006/06/27/changing-the-color-of-a-jcheckbox-check-in-a-jtable/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Victorian Era vs Now Era</title>
		<link>http://www.nathanblomquist.net/blog/2006/06/25/victorian-era-vs-now-era/</link>
		<comments>http://www.nathanblomquist.net/blog/2006/06/25/victorian-era-vs-now-era/#comments</comments>
		<pubDate>Sun, 25 Jun 2006 16:37:55 +0000</pubDate>
		<dc:creator>nblom</dc:creator>
		
		<category><![CDATA[Life]]></category>

		<guid isPermaLink="false">http://www.nathanblomquist.net/blog/2006/06/25/victorian-era-vs-now-era/</guid>
		<description><![CDATA[I once had a thought (yes it does happen).  I don't know if I read the concept somewhere or if I actually thought it up originally.
It seems we have had a total swapping of signals since the Victorian Era.  In the Victorian Era both men and women wanted to be pale.  If [...]]]></description>
			<content:encoded><![CDATA[<p>I once had a thought (yes it does happen).  I don't know if I read the concept somewhere or if I actually thought it up originally.</p>
<p>It seems we have had a total swapping of signals since the Victorian Era.  In the Victorian Era both men and women wanted to be pale.  If you were tanned, that meant you spent all your time outside.  In this era outside meant hard work in the fields and whatnot.</p>
<p>Nowadays, if you are pale it means that you are hard at work inside an office, factory, etc.  If you are tanned, it means you are sitting around outside doing nothing at the beach, pool, etc.</p>
<p>I don't want to take away from our farmers, construction workers, and produce pickers.  These are important jobs.  They still get tan from hard work outside. I was talking about the rich folk, who do nothing all day (*cough*P. Hilton*cough*).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nathanblomquist.net/blog/2006/06/25/victorian-era-vs-now-era/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
