<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Software Passion &#187; General Programming</title>
	<atom:link href="http://www.softwarepassion.com/category/general_programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.softwarepassion.com</link>
	<description>by Krzysztof Grajek</description>
	<lastBuildDate>Thu, 18 Mar 2010 17:46:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Apache Click on Google App Engine &#8211; Hello World Example</title>
		<link>http://www.softwarepassion.com/apache-click-on-google-app-engine-hello-world-example/</link>
		<comments>http://www.softwarepassion.com/apache-click-on-google-app-engine-hello-world-example/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 10:44:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[General Programming]]></category>
		<category><![CDATA[apache click]]></category>
		<category><![CDATA[google app engine]]></category>

		<guid isPermaLink="false">http://www.softwarepassion.com/?p=369</guid>
		<description><![CDATA[Hello World!
If this blog would run on App Engine and was build with Apache Click I could finish this tutorial right here  .
But more seriously, I will describe short step by step tutorial on how to get started with Apache Click on Google App Engine.
I&#8217;m assuming that you have GAE plugin for eclipse installed [...]]]></description>
			<content:encoded><![CDATA[<p>Hello World!<br />
If this blog would run on App Engine and was build with Apache Click I could finish this tutorial right here <img src='http://www.softwarepassion.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .<br />
But more seriously, I will describe short step by step tutorial on how to get started with Apache Click on Google App Engine.<br />
I&#8217;m assuming that you have GAE plugin for eclipse installed already as well as the latest libraries for Apache Click downloaded somewhere on your machine. (If not look at my previous post on how to get started with Apache Click on Eclipse Galileo (<a href="http://www.softwarepassion.com/getting-started-with-apache-click-and-eclipse-galileo/">here</a>).</p>
<p>If all is set up, lets get started..<br />
<script type="text/javascript"><!--
google_ad_client = "pub-3015706834207881";
/* 468x15, utworzono 09-11-19 */
google_ad_slot = "3912330401";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
1. Add new GAE type &#8216;Web Application Project&#8217; (the one with blue google icon)</p>
<p><a href="http://softwarepassion.s3.amazonaws.com/wp-content/uploads/add_new_google_Web_toolkit_project.jpg" rel="lightbox[369]"><img src="http://softwarepassion.s3.amazonaws.com/wp-content/uploads/add_new_google_Web_toolkit_project-263x300.jpg" alt="" title="add_new_google_Web_toolkit_project" width="263" height="300" class="aligncenter size-medium wp-image-372" /></a></p>
<p>2. Copy <strong>click-2.1.0.jar</strong> and <strong>click-extras-2.1.0.jar</strong> to the lib directory under war/WEB-INF/lib of your GAE project.</p>
<p><a href="http://softwarepassion.s3.amazonaws.com/wp-content/uploads/add_libraries.jpg" rel="lightbox[369]"><img src="http://softwarepassion.s3.amazonaws.com/wp-content/uploads/add_libraries-253x300.jpg" alt="" title="add_libraries" width="253" height="300" class="aligncenter size-medium wp-image-370" /></a></p>
<p>3. Click on the project and select &#8216;Properties&#8217; when you will modify the &#8216;Java Build Path&#8217;.<br />
<a href="http://softwarepassion.s3.amazonaws.com/wp-content/uploads/change_java_build_path.jpg" rel="lightbox[369]"><img src="http://softwarepassion.s3.amazonaws.com/wp-content/uploads/change_java_build_path-300x226.jpg" alt="" title="change_java_build_path" width="300" height="226" class="aligncenter size-medium wp-image-371" /></a></p>
<p>When changing the build path, select the two libraries you have added to you lib folder in point 2.</p>
<p><a href="http://softwarepassion.s3.amazonaws.com/wp-content/uploads/change_build_path2.jpg" rel="lightbox[369]"><img src="http://softwarepassion.s3.amazonaws.com/wp-content/uploads/change_build_path2-263x300.jpg" alt="" title="change_build_path2" width="263" height="300" class="aligncenter size-medium wp-image-373" /></a></p>
<p>4. Delete the auto-generated GAE project stuff, like servlet and index.html files.<br />
5. Create new class called &#8216;Index&#8217;</p>
<div class="codecolorer-container java " style="overflow:auto;white-space:nowrap;width:535px"><div class="java codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="kw1">package</span> <span class="co2">com.softwarepassion.clickgae</span><span class="sy0">;</span><br />
<br />
<span class="kw1">import</span> <span class="co2">java.util.Date</span><span class="sy0">;</span><br />
<span class="kw1">import</span> <span class="co2">org.apache.click.Page</span><span class="sy0">;</span><br />
<br />
<span class="kw1">public</span> <span class="kw1">class</span> Index <span class="kw1">extends</span> Page<span class="br0">&#123;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="kw1">private</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Adate+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Date</span></a> time <span class="sy0">=</span> <span class="kw1">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Adate+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Date</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<br />
&nbsp; &nbsp; <span class="kw1">public</span> Index<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; addModel<span class="br0">&#40;</span><span class="st0">&quot;time&quot;</span>, time<span class="br0">&#41;</span><span class="sy0">;</span> <br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
<br />
<span class="br0">&#125;</span></div></div>
<p><script type="text/javascript"><!--
google_ad_client = "pub-3015706834207881";
/* 468x15, utworzono 09-11-19 */
google_ad_slot = "3912330401";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
Note the package you choose for you newly created class file, it will be needed when modifying config files later.</p>
<p>6. Create <strong>click.xml</strong> file in the same location where your <strong>web.xml</strong> file exists.<br />
7. Modify your <strong>web.xml </strong> file to look similar to the one presented below:</p>
<div class="codecolorer-container xml " style="overflow:auto;white-space:nowrap;width:535px"><div class="xml codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="sc3"><span class="re1">&lt;?xml</span> <span class="re0">version</span>=<span class="st0">&quot;1.0&quot;</span> <span class="re0">encoding</span>=<span class="st0">&quot;UTF-8&quot;</span><span class="re2">?&gt;</span></span><br />
<span class="sc3"><span class="re1">&lt;web-app</span> <span class="re0">xmlns:xsi</span>=<span class="st0">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span> <span class="re0">xmlns</span>=<span class="st0">&quot;http://java.sun.com/xml/ns/javaee&quot;</span> <span class="re0">xmlns:web</span>=<span class="st0">&quot;http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&quot;</span> <span class="re0">xsi:schemaLocation</span>=<span class="st0">&quot;http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd&quot;</span> <span class="re0">id</span>=<span class="st0">&quot;WebApp_ID&quot;</span> <span class="re0">version</span>=<span class="st0">&quot;2.5&quot;</span><span class="re2">&gt;</span></span><br />
&nbsp; <span class="sc3"><span class="re1">&lt;listener<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="sc3"><span class="re1">&lt;listener-class<span class="re2">&gt;</span></span></span>org.apache.click.extras.gae.GoogleAppEngineListener<span class="sc3"><span class="re1">&lt;/listener-class<span class="re2">&gt;</span></span></span><br />
&nbsp; <span class="sc3"><span class="re1">&lt;/listener<span class="re2">&gt;</span></span></span><br />
&nbsp; <span class="sc3"><span class="re1">&lt;servlet<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;servlet-name<span class="re2">&gt;</span></span></span>ClickServlet<span class="sc3"><span class="re1">&lt;/servlet-name<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;servlet-class<span class="re2">&gt;</span></span></span>org.apache.click.ClickServlet<span class="sc3"><span class="re1">&lt;/servlet-class<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;load-on-startup<span class="re2">&gt;</span></span></span>0<span class="sc3"><span class="re1">&lt;/load-on-startup<span class="re2">&gt;</span></span></span><br />
&nbsp; <span class="sc3"><span class="re1">&lt;/servlet<span class="re2">&gt;</span></span></span><br />
&nbsp; <span class="sc3"><span class="re1">&lt;servlet-mapping<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;servlet-name<span class="re2">&gt;</span></span></span>ClickServlet<span class="sc3"><span class="re1">&lt;/servlet-name<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;url-pattern<span class="re2">&gt;</span></span></span>*.htm<span class="sc3"><span class="re1">&lt;/url-pattern<span class="re2">&gt;</span></span></span><br />
&nbsp; <span class="sc3"><span class="re1">&lt;/servlet-mapping<span class="re2">&gt;</span></span></span><br />
&nbsp; <span class="sc3"><span class="re1">&lt;welcome-file-list<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;welcome-file<span class="re2">&gt;</span></span></span>index.htm<span class="sc3"><span class="re1">&lt;/welcome-file<span class="re2">&gt;</span></span></span><br />
&nbsp; <span class="sc3"><span class="re1">&lt;/welcome-file-list<span class="re2">&gt;</span></span></span><br />
<span class="sc3"><span class="re1">&lt;/web-app<span class="re2">&gt;</span></span></span></div></div>
<p>It looks like ordinary <strong>web.xml</strong> file with one important addition: the listener section.</p>
<p>8. Add content to your <strong>click.xml</strong> file:</p>
<div class="codecolorer-container xml " style="overflow:auto;white-space:nowrap;width:535px"><div class="xml codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="sc3"><span class="re1">&lt;?xml</span> <span class="re0">version</span>=<span class="st0">&quot;1.0&quot;</span> <span class="re0">encoding</span>=<span class="st0">&quot;UTF-8&quot;</span> <span class="re0">standalone</span>=<span class="st0">&quot;yes&quot;</span><span class="re2">?&gt;</span></span><br />
<span class="sc3"><span class="re1">&lt;click-app</span> <span class="re0">charset</span>=<span class="st0">&quot;UTF-8&quot;</span><span class="re2">&gt;</span></span><br />
&nbsp; <span class="sc3"><span class="re1">&lt;pages<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;page</span> <span class="re0">path</span>=<span class="st0">&quot;index.htm&quot;</span> <span class="re0">classname</span>=<span class="st0">&quot;com.softwarepassion.clickgae.Index&quot;</span><span class="re2">&gt;</span><span class="re1">&lt;/page<span class="re2">&gt;</span></span></span><br />
&nbsp; <span class="sc3"><span class="re1">&lt;/pages<span class="re2">&gt;</span></span></span><br />
&nbsp; <span class="sc3"><span class="re1">&lt;mode</span> <span class="re0">value</span>=<span class="st0">&quot;development&quot;</span><span class="re2">/&gt;</span></span><br />
<span class="sc3"><span class="re1">&lt;/click-app<span class="re2">&gt;</span></span></span></div></div>
<p>9. Add <strong>index.htm</strong> file to the war directory<br />
<script type="text/javascript"><!--
google_ad_client = "pub-3015706834207881";
/* 468x15, utworzono 09-11-19 */
google_ad_slot = "3912330401";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<div class="codecolorer-container html4strict " style="overflow:auto;white-space:nowrap;width:535px"><div class="html4strict codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="sc2">&lt;<a href="http://december.com/html/4/element/html.html"><span class="kw2">html</span></a>&gt;</span><br />
&nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/body.html"><span class="kw2">body</span></a>&gt;</span><br />
<br />
&nbsp; &nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/h2.html"><span class="kw2">h2</span></a>&gt;</span>Hello World<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/h2.html"><span class="kw2">h2</span></a>&gt;</span><br />
<br />
&nbsp; &nbsp; Hello world from Click at $time<br />
<br />
&nbsp; <span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/body.html"><span class="kw2">body</span></a>&gt;</span><br />
<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/html.html"><span class="kw2">html</span></a>&gt;</span></div></div>
<p>10. Deploy your app to Google App Engine and go to the url: http://yourappname.appspot.com</p>
<p>You should see very simple website with current time printed.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.softwarepassion.com/apache-click-on-google-app-engine-hello-world-example/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Getting started with Apache Click and Eclipse Galileo</title>
		<link>http://www.softwarepassion.com/getting-started-with-apache-click-and-eclipse-galileo/</link>
		<comments>http://www.softwarepassion.com/getting-started-with-apache-click-and-eclipse-galileo/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 10:42:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[General Programming]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[apache click]]></category>

		<guid isPermaLink="false">http://www.softwarepassion.com/?p=356</guid>
		<description><![CDATA[Last couple of days I read here and there about Apache Click, which is now in version 2.1.0. It looks preety cool and easy to learn, so I decided to give it a try and see for myself.
I understand that its cool to learn things using vi and shell only, but when you tried many [...]]]></description>
			<content:encoded><![CDATA[<p>Last couple of days I read here and there about Apache Click, which is now in version 2.1.0. It looks preety cool and easy to learn, so I decided to give it a try and see for myself.<br />
I understand that its cool to learn things using vi and shell only, but when you tried many frameworks before, you know how things works, you just want to see how or how not, productive you can be with the new framework, thats why I jump straight to the IDE.<br />
And here, first surprise, with apache click its&#8217; not that easy, well, I&#8217;m mean its still easy but I have encountered a few problems, and right now I would like to share the solution.<br />
First of all, I did not tried all the examples in the apache click user guide yet, haven&#8217;t build anything usefull and definietly I&#8217;m not an Apache Click expert, I think I have figured out how to plug it to Eclipse and I think this is good start <img src='http://www.softwarepassion.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .<br />
<script type="text/javascript"><!--
google_ad_client = "pub-3015706834207881";
/* 468x15, utworzono 09-11-19 */
google_ad_slot = "3912330401";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
Here you have a few points to build your Apache Click IDE:<br />
1. First of all download latest and greatest Eclipse Galileo from <a href="http://www.eclipse.org/downloads/">here</a> &#8211; choose Eclipse for Java EE developers<br />
2. Download Apache Click libraries from <a href="http://click.apache.org/">here</a> &#8211; choose version 2.1.0<br />
3. Download Apache Click IDE from <a href="http://click.apache.org/docs/click-ide-downloads.html">here</a> &#8211; note that it contains Click version 1.5 and it was last updated in November 2008 &#8211; maybe I&#8217;m missing something here?<br />
4. Unzip your ClickIDE and copy the &#8216;features&#8217; and &#8216;plugins&#8217; folders into your Eclipse home directory<br />
5. Unzip your latest click libraries and keep it for later <img src='http://www.softwarepassion.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
6. Start your Eclipse IDE and create new &#8216;Dynamic Web Project&#8217;<br />
<a href="http://softwarepassion.s3.amazonaws.com/wp-content/uploads/dynamic_web_project.jpg" rel="lightbox[356]"><img src="http://softwarepassion.s3.amazonaws.com/wp-content/uploads/dynamic_web_project-254x300.jpg" alt="" title="dynamic_web_project" width="254" height="300" class="aligncenter size-medium wp-image-361" /></a><br />
Choose target name, in this case &#8216;ClickDemo2&#8242;, select your target runtime as Tomcat 6+ etc.<br />
7. Under configuration combo box, select custom and click &#8216;Modify&#8217;<br />
<a href="http://softwarepassion.s3.amazonaws.com/wp-content/uploads/custom_click_config.jpg" rel="lightbox[356]"><img src="http://softwarepassion.s3.amazonaws.com/wp-content/uploads/custom_click_config-300x265.jpg" alt="" title="custom_click_config" width="300" height="265" class="aligncenter size-medium wp-image-359" /></a><br />
8. Select &#8216;Click&#8217; in Project Facet List and save the configuration as click config<br />
<a href="http://softwarepassion.s3.amazonaws.com/wp-content/uploads/click_config.jpg" rel="lightbox[356]"><img src="http://softwarepassion.s3.amazonaws.com/wp-content/uploads/click_config-300x232.jpg" alt="" title="click_config" width="300" height="232" class="aligncenter size-medium wp-image-357" /></a><br />
9. Once you have your configuration created, dynamic web project screen should look like in the following screenshot:<br />
<a href="http://softwarepassion.s3.amazonaws.com/wp-content/uploads/custom_click_config2.jpg" rel="lightbox[356]"><img src="http://softwarepassion.s3.amazonaws.com/wp-content/uploads/custom_click_config2-255x300.jpg" alt="" title="custom_click_config2" width="255" height="300" class="aligncenter size-medium wp-image-360" /></a><br />
10. The rest of the settings you can leave as it is, just click &#8216;Next&#8217; up to the point when you finish creating new dynamic web project.<br />
11. After your project is created it will have the structure like in the following screen:<br />
<a href="http://softwarepassion.s3.amazonaws.com/wp-content/uploads/clickdemo_project_structure.jpg" rel="lightbox[356]"><img src="http://softwarepassion.s3.amazonaws.com/wp-content/uploads/clickdemo_project_structure-274x300.jpg" alt="" title="clickdemo_project_structure" width="274" height="300" class="aligncenter size-medium wp-image-358" /></a><br />
<script type="text/javascript"><!--
google_ad_client = "pub-3015706834207881";
/* 468x15, utworzono 09-11-19 */
google_ad_slot = "3912330401";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
Notice that there are click libraries from version 1.5, which is no good, we want to use the latest version which is 2.1.0.<br />
12. Copy the files &#8216;click-2.1.0.jar&#8217; and &#8216;click-extras-2.1.0.jar&#8217; into the same lib folder where the old libraries are found.<br />
13. Delete old libraries and refresh the project tree under eclipse (right click on the project node and select &#8216;Refresh&#8217;), now you will see the new libraries come up in the lib folder.<br />
14. Open your web.xml file under &#8216;WebContent/WEB-INF/&#8217; folder and change the class name of the main Click Servlet, from &#8216;net.sf.click.ClickServlet&#8217; to &#8216;org.apache.click.ClickServlet&#8217; in &#8217;servlet-class&#8217; declaration.<br />
15. With Eclipse, select the project node and click &#8216;New&#8217; -> &#8216;Other&#8217;, choose &#8216;Click Page&#8217; under &#8216;click&#8217; directory.<br />
<a href="http://softwarepassion.s3.amazonaws.com/wp-content/uploads/new_click_page.jpg" rel="lightbox[356]"><img src="http://softwarepassion.s3.amazonaws.com/wp-content/uploads/new_click_page-300x285.jpg" alt="" title="new_click_page" width="300" height="285" class="aligncenter size-medium wp-image-362" /></a><br />
16. Fill out the necessary fields for your new click page as below:<br />
<a href="http://softwarepassion.s3.amazonaws.com/wp-content/uploads/new_click_page2.jpg" rel="lightbox[356]"><img src="http://softwarepassion.s3.amazonaws.com/wp-content/uploads/new_click_page2-264x300.jpg" alt="" title="new_click_page2" width="264" height="300" class="aligncenter size-medium wp-image-363" /></a><br />
17. Name the file &#8216;index.htm&#8217; and click &#8216;Finish&#8217;<br />
18. Under the page java source file, fix the Page class by using the page from the: org.apache.click.Page instead of the old path.</p>
<div class="codecolorer-container java " style="overflow:auto;white-space:nowrap;width:535px"><div class="java codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="kw1">package</span> <span class="co2">com.softwarepassion</span><span class="sy0">;</span><br />
<br />
<span class="kw1">import</span> <span class="co2">java.util.Date</span><span class="sy0">;</span><br />
<br />
<span class="kw1">import</span> <span class="co2">org.apache.click.Page</span><span class="sy0">;</span><br />
<br />
<br />
<span class="kw1">public</span> <span class="kw1">class</span> Index <span class="kw1">extends</span> Page <span class="br0">&#123;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="kw1">private</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Adate+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Date</span></a> time <span class="sy0">=</span> <span class="kw1">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Adate+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Date</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span class="kw1">public</span> Index<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; addModel<span class="br0">&#40;</span><span class="st0">&quot;time&quot;</span>, time<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
<br />
<span class="br0">&#125;</span></div></div>
<p>Modify your &#8216;index.htm&#8217; using html editor to look something like this:</p>
<div class="codecolorer-container html4strict " style="overflow:auto;white-space:nowrap;width:535px"><div class="html4strict codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="sc2">&lt;<a href="http://december.com/html/4/element/html.html"><span class="kw2">html</span></a>&gt;</span><br />
&nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/head.html"><span class="kw2">head</span></a>&gt;</span><br />
&nbsp; &nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/meta.html"><span class="kw2">META</span></a> <span class="kw3">HTTP-EQUIV</span><span class="sy0">=</span><span class="st0">&quot;Content-Type&quot;</span> <span class="kw3">CONTENT</span><span class="sy0">=</span><span class="st0">&quot;text/html;charset=UTF-8&quot;</span>&gt;</span><br />
&nbsp; &nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/title.html"><span class="kw2">title</span></a>&gt;</span>Blank<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/title.html"><span class="kw2">title</span></a>&gt;</span><br />
&nbsp; &nbsp; $imports<br />
&nbsp; <span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/head.html"><span class="kw2">head</span></a>&gt;</span><br />
&nbsp; <span class="sc2">&lt;<a href="http://december.com/html/4/element/body.html"><span class="kw2">body</span></a>&gt;</span><br />
&nbsp; $time<br />
&nbsp; <span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/body.html"><span class="kw2">body</span></a>&gt;</span><br />
<span class="sc2">&lt;<span class="sy0">/</span><a href="http://december.com/html/4/element/html.html"><span class="kw2">html</span></a>&gt;</span></div></div>
<p>19. Start up your project in tomcat. The page should display current time!<br />
<script type="text/javascript"><!--
google_ad_client = "pub-3015706834207881";
/* 468x15, utworzono 09-11-19 */
google_ad_slot = "3912330401";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
Additional Comments:<br />
I know that this is just a quickfix, and I just cannot belive that there is no proper eclipse plugin using the latest click framework, which would be up to date, if you know any, than please comment and save me and my readers precious time.</p>
<p>Thank you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.softwarepassion.com/getting-started-with-apache-click-and-eclipse-galileo/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Jasperberry &#8211; the most dynamic reports ever.</title>
		<link>http://www.softwarepassion.com/jasperberry-the-most-dynamic-reports-ever/</link>
		<comments>http://www.softwarepassion.com/jasperberry-the-most-dynamic-reports-ever/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 09:03:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[General Programming]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[jasperberry]]></category>

		<guid isPermaLink="false">http://www.softwarepassion.com/?p=350</guid>
		<description><![CDATA[Today I will describe in short my latest and simplest quick and dirty trick, generating jasper report dynamically. Jasperberry is a component written very quickly to help me
generate pdf report in a situation where I don&#8217;t know the number of columns I will have, I don&#8217;t know their widths, the data they contain etc, all [...]]]></description>
			<content:encoded><![CDATA[<p>Today I will describe in short my latest and simplest quick and dirty trick, generating jasper report dynamically. Jasperberry is a component written very quickly to help me<br />
generate pdf report in a situation where I don&#8217;t know the number of columns I will have, I don&#8217;t know their widths, the data they contain etc, all is generated at runtime dynamically.<br />
I know that there is DynamicJasper project but it seems to be dead, and its dead in a very strange way, I mean, I see that the authors commit new code but there is no chance to get any support unless, I guess, you pay for it.<br />
With dynamic jasper I couldn&#8217;t generate report with polish fonts displayed properly, tried many different tricks, no support on the forum, no support on stack overflow, no nothing. After 2 days I have realized that I will write my own library quicker to solve my problem than get an answer from the dynamic jasper community (if there is any).<br />
So here we have: jasperberry!<br />
<script type="text/javascript"><!--
google_ad_client = "pub-3015706834207881";
/* 468x15, utworzono 09-11-19 */
google_ad_slot = "3912330401";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
Don&#8217;t expect too much from it but if you want to display simple table with data, dynamic columns, adjustable fonts and colors than this is it.</p>
<p>In fact you don&#8217;t have to even know object properties to generate the report, we will use Apache DynaBeans for that:</p>
<p>This is a simple example code snipped showing you how to get started with the simplest and most dynamic reporting library ever (as well as lacking features probably but we hope its enough for simple projects)</p>
<p>This example assumes the following:</p>
<p>1. You want simple report<br />
2. You dont have to know the object which properties you want to display in advance, by this I mean you can create report columns dynamically, and by using apache dyna beans your objects don&#8217;t have to even exists. You just dynamically create them and inject them into the report.</p>
<p>Here is an example test class showing you how to use jasperberry, for more info please contact us directly at softberries.com<br />
Code:</p>
<div class="codecolorer-container java " style="overflow:auto;white-space:nowrap;width:535px;height:300px"><div class="java codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="kw1">public</span> <span class="kw1">class</span> JRXMLBuilderTest <span class="br0">&#123;</span><br />
<br />
&nbsp; &nbsp; <span class="kw1">private</span> <span class="kw1">static</span> List<span class="sy0">&lt;</span>JBColumnBean<span class="sy0">&gt;</span> columns<span class="sy0">;</span><br />
<br />
&nbsp; &nbsp; <span class="kw1">public</span> JRXMLBuilderTest<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
<br />
&nbsp; &nbsp; @BeforeClass<br />
&nbsp; &nbsp; <span class="kw1">public</span> <span class="kw1">static</span> <span class="kw4">void</span> setUpClass<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="kw1">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Exception</span></a> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; columns <span class="sy0">=</span> <span class="kw1">new</span> ArrayList<span class="sy0">&lt;</span>JBColumnBean<span class="sy0">&gt;</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; JBColumnBean col1 <span class="sy0">=</span> <span class="kw1">new</span> JBColumnBean<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; JBColumnBean col2 <span class="sy0">=</span> <span class="kw1">new</span> JBColumnBean<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; JBColumnBean col3 <span class="sy0">=</span> <span class="kw1">new</span> JBColumnBean<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; JBColumnBean col4 <span class="sy0">=</span> <span class="kw1">new</span> JBColumnBean<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; JBColumnBean col5 <span class="sy0">=</span> <span class="kw1">new</span> JBColumnBean<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; JBColumnBean col6 <span class="sy0">=</span> <span class="kw1">new</span> JBColumnBean<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; JBColumnBean col7 <span class="sy0">=</span> <span class="kw1">new</span> JBColumnBean<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; col1.<span class="me1">setPreferredWidth</span><span class="br0">&#40;</span><span class="nu0">60</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; col1.<span class="me1">setProperty</span><span class="br0">&#40;</span><span class="st0">&quot;name&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; col1.<span class="me1">setTitle</span><span class="br0">&#40;</span><span class="st0">&quot;Imię&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; col2.<span class="me1">setPreferredWidth</span><span class="br0">&#40;</span><span class="nu0">60</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; col2.<span class="me1">setProperty</span><span class="br0">&#40;</span><span class="st0">&quot;surname&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; col2.<span class="me1">setTitle</span><span class="br0">&#40;</span><span class="st0">&quot;Nazwisko&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; col3.<span class="me1">setPreferredWidth</span><span class="br0">&#40;</span><span class="nu0">160</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; col3.<span class="me1">setProperty</span><span class="br0">&#40;</span><span class="st0">&quot;comment&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; col3.<span class="me1">setTitle</span><span class="br0">&#40;</span><span class="st0">&quot;Komentarz&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; col4.<span class="me1">setPreferredWidth</span><span class="br0">&#40;</span><span class="nu0">100</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; col4.<span class="me1">setProperty</span><span class="br0">&#40;</span><span class="st0">&quot;comment2&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; col4.<span class="me1">setTitle</span><span class="br0">&#40;</span><span class="st0">&quot;Komentarz&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; col5.<span class="me1">setPreferredWidth</span><span class="br0">&#40;</span><span class="nu0">100</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; col5.<span class="me1">setProperty</span><span class="br0">&#40;</span><span class="st0">&quot;comment3&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; col5.<span class="me1">setTitle</span><span class="br0">&#40;</span><span class="st0">&quot;Komentarz&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; col6.<span class="me1">setPreferredWidth</span><span class="br0">&#40;</span><span class="nu0">100</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; col6.<span class="me1">setProperty</span><span class="br0">&#40;</span><span class="st0">&quot;comment4&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; col6.<span class="me1">setTitle</span><span class="br0">&#40;</span><span class="st0">&quot;Komentarz&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; col7.<span class="me1">setPreferredWidth</span><span class="br0">&#40;</span><span class="nu0">100</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; col7.<span class="me1">setProperty</span><span class="br0">&#40;</span><span class="st0">&quot;comment5&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; col7.<span class="me1">setTitle</span><span class="br0">&#40;</span><span class="st0">&quot;Komentarz&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; columns.<span class="me1">add</span><span class="br0">&#40;</span>col1<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; columns.<span class="me1">add</span><span class="br0">&#40;</span>col2<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; columns.<span class="me1">add</span><span class="br0">&#40;</span>col3<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; columns.<span class="me1">add</span><span class="br0">&#40;</span>col4<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; columns.<span class="me1">add</span><span class="br0">&#40;</span>col5<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; columns.<span class="me1">add</span><span class="br0">&#40;</span>col6<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; columns.<span class="me1">add</span><span class="br0">&#40;</span>col7<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
<br />
&nbsp; &nbsp; @AfterClass<br />
&nbsp; &nbsp; <span class="kw1">public</span> <span class="kw1">static</span> <span class="kw4">void</span> tearDownClass<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="kw1">throws</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Exception</span></a> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
<br />
&nbsp; &nbsp; @Before<br />
&nbsp; &nbsp; <span class="kw1">public</span> <span class="kw4">void</span> setUp<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
<br />
&nbsp; &nbsp; @After<br />
&nbsp; &nbsp; <span class="kw1">public</span> <span class="kw4">void</span> tearDown<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
<br />
&nbsp; &nbsp; <span class="co3">/** * Test of build method, of class JRXMLBuilder. */</span><br />
&nbsp; &nbsp; @Test<br />
&nbsp; &nbsp; <span class="kw1">public</span> <span class="kw4">void</span> testBuild<span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">try</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Asystem+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">System</span></a>.<span class="me1">out</span>.<span class="me1">println</span><span class="br0">&#40;</span><span class="st0">&quot;build&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; List<span class="sy0">&lt;</span>JBReportElement<span class="sy0">&gt;</span> elements <span class="sy0">=</span> <span class="kw1">new</span> ArrayList<span class="sy0">&lt;</span>JBReportElement<span class="sy0">&gt;</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//col header font </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; JBFont colHeaderFont <span class="sy0">=</span> <span class="kw1">new</span> JBFont<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; colHeaderFont.<span class="me1">setBold</span><span class="br0">&#40;</span><span class="kw2">true</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; colHeaderFont.<span class="me1">setSize</span><span class="br0">&#40;</span><span class="nu0">10</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; colHeaderFont.<span class="me1">setForegroundColor</span><span class="br0">&#40;</span><span class="st0">&quot;#555555&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//detail font </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; JBFont detailFont <span class="sy0">=</span> <span class="kw1">new</span> JBFont<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; detailFont.<span class="me1">setSize</span><span class="br0">&#40;</span><span class="nu0">6</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; detailFont.<span class="me1">setForegroundColor</span><span class="br0">&#40;</span><span class="st0">&quot;#000000&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; detailFont.<span class="me1">setPdfEncoding</span><span class="br0">&#40;</span><span class="st0">&quot;Cp1257&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; JBPage page <span class="sy0">=</span> <span class="kw1">new</span> JBPage<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; JBReport report <span class="sy0">=</span> <span class="kw1">new</span> JBReport<span class="br0">&#40;</span>page, colHeaderFont, detailFont, <span class="st0">&quot;#CCCCFF&quot;</span>, <span class="st0">&quot;#DEDEDE&quot;</span>, <span class="st0">&quot;#FFFFFF&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; JBFont titleFont <span class="sy0">=</span> <span class="kw1">new</span> JBFont<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; titleFont.<span class="me1">setBold</span><span class="br0">&#40;</span><span class="kw2">true</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; titleFont.<span class="me1">setSize</span><span class="br0">&#40;</span><span class="nu0">20</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; titleFont.<span class="me1">setForegroundColor</span><span class="br0">&#40;</span><span class="st0">&quot;#FF0000&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; titleFont.<span class="me1">setPdfEncoding</span><span class="br0">&#40;</span><span class="st0">&quot;Cp1257&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//add title elements </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; elements.<span class="me1">add</span><span class="br0">&#40;</span><span class="kw1">new</span> JBStaticTextElement<span class="br0">&#40;</span><span class="st0">&quot;Hello World!&quot;</span>, <span class="nu0">450</span>, <span class="nu0">10</span>, <span class="nu0">300</span>, titleFont<span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; elements.<span class="me1">add</span><span class="br0">&#40;</span><span class="kw1">new</span> JBImageElement<span class="br0">&#40;</span><span class="st0">&quot;C:<span class="es0">\\</span><span class="es0">\\</span>Documents and Settings<span class="es0">\\</span><span class="es0">\\</span>admin<span class="es0">\\</span><span class="es0">\\</span>Moje dokumenty<span class="es0">\\</span><span class="es0">\\</span>NetBeansProjects<span class="es0">\\</span><span class="es0">\\</span>JASPER_BERRY<span class="es0">\\</span><span class="es0">\\</span>test.jpg&quot;</span>, <span class="nu0">0</span>, <span class="nu0">0</span>, <span class="nu0">350</span>, <span class="nu0">242</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; report.<span class="me1">setTitleElements</span><span class="br0">&#40;</span>elements<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; JRXMLBuilder instance <span class="sy0">=</span> <span class="kw1">new</span> JRXMLBuilder<span class="br0">&#40;</span>columns, report<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw4">boolean</span> expResult <span class="sy0">=</span> <span class="kw2">true</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw4">boolean</span> result <span class="sy0">=</span> instance.<span class="me1">build</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; JasperReport jr <span class="sy0">=</span> JasperCompileManager.<span class="me1">compileReport</span><span class="br0">&#40;</span><span class="st0">&quot;jasperberry_by_softberries.jrxml&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//PREPARE SOME DATA </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DynaProperty<span class="br0">&#91;</span><span class="br0">&#93;</span> props <span class="sy0">=</span> <span class="kw1">new</span> DynaProperty<span class="br0">&#91;</span>columns.<span class="me1">size</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#93;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">for</span> <span class="br0">&#40;</span><span class="kw4">int</span> i <span class="sy0">=</span> <span class="nu0">0</span><span class="sy0">;</span> i <span class="sy0">&lt;</span> columns.<span class="me1">size</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span> i<span class="sy0">++</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; props<span class="br0">&#91;</span>i<span class="br0">&#93;</span> <span class="sy0">=</span> <span class="kw1">new</span> DynaProperty<span class="br0">&#40;</span>columns.<span class="me1">get</span><span class="br0">&#40;</span>i<span class="br0">&#41;</span>.<span class="me1">getProperty</span><span class="br0">&#40;</span><span class="br0">&#41;</span>, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Astring+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">String</span></a>.<span class="kw1">class</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; BasicDynaClass dynaClass <span class="sy0">=</span> <span class="kw1">new</span> BasicDynaClass<span class="br0">&#40;</span><span class="st0">&quot;tester&quot;</span>, <span class="kw2">null</span>, props<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; List<span class="sy0">&lt;</span>DynaBean<span class="sy0">&gt;</span> beans <span class="sy0">=</span> <span class="kw1">new</span> ArrayList<span class="sy0">&lt;</span>DynaBean<span class="sy0">&gt;</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">for</span> <span class="br0">&#40;</span><span class="kw4">int</span> i <span class="sy0">=</span> <span class="nu0">0</span><span class="sy0">;</span> i <span class="sy0">&lt;</span> <span class="nu0">100</span><span class="sy0">;</span> i<span class="sy0">++</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DynaBean db <span class="sy0">=</span> dynaClass.<span class="me1">newInstance</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; db.<span class="me1">set</span><span class="br0">&#40;</span><span class="st0">&quot;name&quot;</span>, <span class="st0">&quot;Krzysztof &quot;</span> <span class="sy0">+</span> i<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; db.<span class="me1">set</span><span class="br0">&#40;</span><span class="st0">&quot;surname&quot;</span>, <span class="st0">&quot;Grajek &quot;</span> <span class="sy0">+</span> i<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; db.<span class="me1">set</span><span class="br0">&#40;</span><span class="st0">&quot;comment&quot;</span>, <span class="st0">&quot;Komentarz &quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; db.<span class="me1">set</span><span class="br0">&#40;</span><span class="st0">&quot;comment2&quot;</span>, <span class="st0">&quot;Komentarz &quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; db.<span class="me1">set</span><span class="br0">&#40;</span><span class="st0">&quot;comment3&quot;</span>, <span class="st0">&quot;Komentarz &quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; db.<span class="me1">set</span><span class="br0">&#40;</span><span class="st0">&quot;comment4&quot;</span>, <span class="st0">&quot;Komentarz &quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">//</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; db.<span class="me1">set</span><span class="br0">&#40;</span><span class="st0">&quot;comment5&quot;</span>, <span class="st0">&quot;Komentarz &quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; beans.<span class="me1">add</span><span class="br0">&#40;</span>db<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; JasperPrint jp <span class="sy0">=</span> JasperFillManager.<span class="me1">fillReport</span><span class="br0">&#40;</span>jr, <span class="kw2">null</span>, <span class="kw1">new</span> JRBeanCollectionDataSource<span class="br0">&#40;</span>beans<span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; JasperExportManager.<span class="me1">exportReportToPdfFile</span><span class="br0">&#40;</span>jp, <span class="st0">&quot;jasperberry.pdf&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; assertEquals<span class="br0">&#40;</span>expResult, result<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span> <span class="kw1">catch</span> <span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aexception+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Exception</span></a> ex<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Logger.<span class="me1">getLogger</span><span class="br0">&#40;</span>JRXMLBuilderTest.<span class="kw1">class</span>.<span class="me1">getName</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>.<span class="me1">log</span><span class="br0">&#40;</span>Level.<span class="me1">SEVERE</span>, <span class="kw2">null</span>, ex<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div></div>
<p>You should find similar snippet in a test suite of the project.<br />
The project itself is licensed under LGPL and its available from sourceforge <a href="http://sourceforge.net/projects/jasperberry/">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.softwarepassion.com/jasperberry-the-most-dynamic-reports-ever/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Deploy your Java Application with IzPack Installer</title>
		<link>http://www.softwarepassion.com/deploy-your-java-application-with-izpack-installer/</link>
		<comments>http://www.softwarepassion.com/deploy-your-java-application-with-izpack-installer/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 18:16:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[General Programming]]></category>
		<category><![CDATA[desktop installer]]></category>
		<category><![CDATA[izpack]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://www.softwarepassion.com/?p=341</guid>
		<description><![CDATA[<span style="max-width: 100px; display: block; float: left;"><img src="http://softwarepassion.s3.amazonaws.com/wp-content/uploads/izpack_directory-300x168.png" alt="izpack installer folders" title="izpack installer content" width="100" height="100"/></span><span style="margin: 0px; padding-left: 10px; display: block; max-width: 370px; float: left;">Deploy your Java Application with IzPack Installer</span>]]></description>
			<content:encoded><![CDATA[<p>This is a short tutorial on how to create simple IzPack based installation solution on windows platform with all standard features like: desktop shortcut, start menu item shortcut, copying libraries, folders, documentation into one of the ProgramFiles folder on the windows machine.<br />
I had some problems creating windows shortcuts mysefl and I wanted to share the experience so other people can find it quicker.<br />
Here you go.<br />
<script type="text/javascript"><!--
google_ad_client = "pub-3015706834207881";
/* 468x15, utworzono 09-11-19 */
google_ad_slot = "3912330401";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
1. First download and install IzPack itself from: <a href="http://izpack.org">izpack website</a></p>
<p>2. Prepare the application you want to make installable, I use Netbeans to build most of my Java apps, but I guess for all other ide&#8217;s the results after all are the same, we end up with SomeApp.jar file and a bunch of libraries we used to build it.<br />
On the Netbeans platform all the files needed to launch the application we have build end up in &#8216;dist&#8217; folder as a subfolder of our project main folder. If you have used any libraries to build your desktop application they will be included in the lib folder (yourproject/dist/lib/).</p>
<p>3. Now, once we have all the main ingredients (our application and installer) we need to connect it together. Create the folder anywhere on your machine, and call it for example &#8217;softwarepassion&#8217;. </p>
<p>4. Put your jar file together with the &#8216;lib&#8217; folder into the &#8217;softwarepassion&#8217; catalog.</p>
<p>5. Now we need to add some native libraries for Izpack to be able to add windows shortcuts on the desktop and start menu. Create &#8216;bin&#8217; folder under the &#8217;softwarepassion&#8217; folder and copy whole &#8216;native&#8217; content found in your izpack installation into the &#8216;bin&#8217; folder of your root &#8217;softwarepassion&#8217; catalog.<br />
You can find the native folder inside your IzPack installation directory, normally under: &#8216;C:\Program Files\IzPack\bin&#8217;</p>
<p>6. Create your application icon file and add it to your &#8217;softwarepasison&#8217; catalog. I call mine &#8216;exe.ico&#8217;.</p>
<p>7. Now comes the hardest part to get initially but after you build your first installer it all gets clear and easy <img src='http://www.softwarepassion.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
We need to prepare two separate xml files: one called &#8216;install.xml&#8217; and another one called &#8217;shortcutSpec.xml&#8217;.</p>
<p>The content of both example files is listed below:<br />
<script type="text/javascript"><!--
google_ad_client = "pub-3015706834207881";
/* 468x15, utworzono 09-11-19 */
google_ad_slot = "3912330401";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<div class="codecolorer-container xml " style="overflow:auto;white-space:nowrap;width:535px;height:300px"><div class="xml codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="sc3"><span class="re1">&lt;?xml</span> <span class="re0">version</span>=<span class="st0">&quot;1.0&quot;</span> <span class="re0">encoding</span>=<span class="st0">&quot;iso-8859-1&quot;</span> <span class="re0">standalone</span>=<span class="st0">&quot;yes&quot;</span> <span class="re2">?&gt;</span></span><br />
<br />
<span class="sc-1">&lt;!-- </span><br />
<span class="sc-1"> &nbsp; &nbsp;A sample installation file.</span><br />
<span class="sc-1"> &nbsp; &nbsp;Use it as a base for your own installers :-)</span><br />
<span class="sc-1"> &nbsp; &nbsp;</span><br />
<span class="sc-1"> &nbsp; &nbsp;To compile it :</span><br />
<span class="sc-1"> &nbsp; &nbsp;- go in the bin directory where you installed IzPack</span><br />
<span class="sc-1"> &nbsp; &nbsp;- call &quot;compile ../sample/install.xml -b ../sample&quot;</span><br />
<span class="sc-1">--&gt;</span><br />
<br />
<span class="sc3"><span class="re1">&lt;installation</span> <span class="re0">version</span>=<span class="st0">&quot;1.0&quot;</span><span class="re2">&gt;</span></span><br />
<br />
&nbsp; &nbsp; <span class="sc-1">&lt;!-- </span><br />
<span class="sc-1"> &nbsp; &nbsp; &nbsp; &nbsp;The info section.</span><br />
<span class="sc-1"> &nbsp; &nbsp; &nbsp; &nbsp;The meaning of the tags should be natural ...</span><br />
<span class="sc-1"> &nbsp; &nbsp;--&gt;</span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;info<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;appname<span class="re2">&gt;</span></span></span>SoftwarePassion Application<span class="sc3"><span class="re1">&lt;/appname<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;appversion<span class="re2">&gt;</span></span></span>1.0<span class="sc3"><span class="re1">&lt;/appversion<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;authors<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;author</span> <span class="re0">name</span>=<span class="st0">&quot;Softberries Krzysztof Grajek&quot;</span> <span class="re0">email</span>=<span class="st0">&quot;customer.service@softberries.com&quot;</span><span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/authors<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;url<span class="re2">&gt;</span></span></span>http://www.softwarepassion.com/<span class="sc3"><span class="re1">&lt;/url<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/info<span class="re2">&gt;</span></span></span><br />
<br />
&nbsp; &nbsp; <span class="sc-1">&lt;!-- </span><br />
<span class="sc-1"> &nbsp; &nbsp; &nbsp; &nbsp;The gui preferences indication.</span><br />
<span class="sc-1"> &nbsp; &nbsp; &nbsp; &nbsp;Sets the installer window to 640x480. It will not be able to change the size.</span><br />
<span class="sc-1"> &nbsp; &nbsp;--&gt;</span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;guiprefs</span> <span class="re0">width</span>=<span class="st0">&quot;640&quot;</span> <span class="re0">height</span>=<span class="st0">&quot;480&quot;</span> <span class="re0">resizable</span>=<span class="st0">&quot;yes&quot;</span><span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;variables<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;variable</span> <span class="re0">name</span>=<span class="st0">&quot;DesktopShortcutCheckboxEnabled&quot;</span> <span class="re0">value</span>=<span class="st0">&quot;true&quot;</span><span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/variables<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc-1">&lt;!-- </span><br />
<span class="sc-1"> &nbsp; &nbsp; &nbsp; &nbsp;The locale section.</span><br />
<span class="sc-1"> &nbsp; &nbsp; &nbsp; &nbsp;Asks here to include the English and French langpacks.</span><br />
<span class="sc-1"> &nbsp; &nbsp;--&gt;</span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;locale<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;langpack</span> <span class="re0">iso3</span>=<span class="st0">&quot;pol&quot;</span><span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;langpack</span> <span class="re0">iso3</span>=<span class="st0">&quot;eng&quot;</span><span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/locale<span class="re2">&gt;</span></span></span><br />
<br />
&nbsp; &nbsp; <span class="sc-1">&lt;!-- </span><br />
<span class="sc-1"> &nbsp; &nbsp; &nbsp; &nbsp;The resources section.</span><br />
<span class="sc-1"> &nbsp; &nbsp; &nbsp; &nbsp;The ids must be these ones if you want to use the LicencePanel and/or the InfoPanel.</span><br />
<span class="sc-1"> &nbsp; &nbsp;--&gt;</span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;resources<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;res</span> <span class="re0">src</span>=<span class="st0">&quot;shortcutSpec.xml&quot;</span> <span class="re0">id</span>=<span class="st0">&quot;shortcutSpec.xml&quot;</span><span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;res</span> <span class="re0">id</span>=<span class="st0">&quot;LicencePanel.licence&quot;</span> <span class="re0">src</span>=<span class="st0">&quot;Licence.txt&quot;</span><span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;res</span> <span class="re0">id</span>=<span class="st0">&quot;InfoPanel.info&quot;</span> <span class="re0">src</span>=<span class="st0">&quot;Readme.txt&quot;</span><span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/resources<span class="re2">&gt;</span></span></span><br />
<br />
&nbsp; &nbsp; <span class="sc-1">&lt;!-- </span><br />
<span class="sc-1"> &nbsp; &nbsp; &nbsp; &nbsp;The panels section.</span><br />
<span class="sc-1"> &nbsp; &nbsp; &nbsp; &nbsp;We indicate here which panels we want to use. The order will be respected.</span><br />
<span class="sc-1"> &nbsp; &nbsp;--&gt;</span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;panels<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;panel</span> <span class="re0">classname</span>=<span class="st0">&quot;HelloPanel&quot;</span><span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;panel</span> <span class="re0">classname</span>=<span class="st0">&quot;LicencePanel&quot;</span><span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;panel</span> <span class="re0">classname</span>=<span class="st0">&quot;TargetPanel&quot;</span><span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;panel</span> <span class="re0">classname</span>=<span class="st0">&quot;PacksPanel&quot;</span><span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;panel</span> <span class="re0">classname</span>=<span class="st0">&quot;InstallPanel&quot;</span><span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;panel</span> <span class="re0">classname</span>=<span class="st0">&quot;ShortcutPanel&quot;</span><span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;panel</span> <span class="re0">classname</span>=<span class="st0">&quot;FinishPanel&quot;</span><span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/panels<span class="re2">&gt;</span></span></span><br />
<br />
&nbsp; &nbsp; <span class="sc-1">&lt;!-- </span><br />
<span class="sc-1"> &nbsp; &nbsp; &nbsp; &nbsp;The packs section.</span><br />
<span class="sc-1"> &nbsp; &nbsp; &nbsp; &nbsp;We specify here our packs.</span><br />
<span class="sc-1"> &nbsp; &nbsp;--&gt;</span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;packs<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;pack</span> <span class="re0">name</span>=<span class="st0">&quot;Base&quot;</span> <span class="re0">required</span>=<span class="st0">&quot;yes&quot;</span><span class="re2">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;description<span class="re2">&gt;</span></span></span>The base files<span class="sc3"><span class="re1">&lt;/description<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;file</span> <span class="re0">src</span>=<span class="st0">&quot;Readme.txt&quot;</span> <span class="re0">targetdir</span>=<span class="st0">&quot;$INSTALL_PATH&quot;</span><span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;file</span> <span class="re0">src</span>=<span class="st0">&quot;Licence.txt&quot;</span> <span class="re0">targetdir</span>=<span class="st0">&quot;$INSTALL_PATH&quot;</span><span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;file</span> <span class="re0">src</span>=<span class="st0">&quot;exe.ico&quot;</span> <span class="re0">targetdir</span>=<span class="st0">&quot;$INSTALL_PATH&quot;</span><span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;file</span> <span class="re0">src</span>=<span class="st0">&quot;SoftwarePassionHelloIzPack.jar&quot;</span> <span class="re0">targetdir</span>=<span class="st0">&quot;$INSTALL_PATH&quot;</span><span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;fileset</span> <span class="re0">dir</span>=<span class="st0">&quot;lib&quot;</span> <span class="re0">targetdir</span>=<span class="st0">&quot;$INSTALL_PATH\lib&quot;</span><span class="re2">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;include</span> <span class="re0">name</span>=<span class="st0">&quot;**&quot;</span><span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/fileset<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/pack<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/packs<span class="re2">&gt;</span></span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;native</span> <span class="re0">type</span>=<span class="st0">&quot;izpack&quot;</span> <span class="re0">name</span>=<span class="st0">&quot;ShellLink.dll&quot;</span><span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;native</span> <span class="re0">type</span>=<span class="st0">&quot;3rdparty&quot;</span> <span class="re0">name</span>=<span class="st0">&quot;COIOSHelper.dll&quot;</span> <span class="re0">stage</span>=<span class="st0">&quot;both&quot;</span><span class="re2">&gt;</span></span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;os</span> <span class="re0">family</span>=<span class="st0">&quot;windows&quot;</span><span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/native<span class="re2">&gt;</span></span></span><br />
<span class="sc3"><span class="re1">&lt;/installation<span class="re2">&gt;</span></span></span></div></div>
<p>And the one for windows shortcuts:</p>
<div class="codecolorer-container xml " style="overflow:auto;white-space:nowrap;width:535px;height:300px"><div class="xml codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="sc3"><span class="re1">&lt;?xml</span> <span class="re0">version</span>=<span class="st0">&quot;1.0&quot;</span> <span class="re0">encoding</span>=<span class="st0">&quot;UTF-8&quot;</span> <span class="re0">standalone</span>=<span class="st0">&quot;yes&quot;</span> <span class="re2">?&gt;</span></span><br />
<br />
<span class="sc3"><span class="re1">&lt;shortcuts<span class="re2">&gt;</span></span></span><br />
<br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;skipIfNotSupported</span><span class="re2">/&gt;</span></span><br />
<br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;programGroup</span> <span class="re0">defaultName</span>=<span class="st0">&quot;Siemens AWORT&quot;</span> <span class="re0">location</span>=<span class="st0">&quot;applications&quot;</span><span class="re2">/&gt;</span></span><br />
<br />
&nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;shortcut</span></span><br />
<span class="sc3"> &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">name</span>=<span class="st0">&quot;SoftwarePassion Application&quot;</span></span><br />
<span class="sc3"> &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">programGroup</span>=<span class="st0">&quot;yes&quot;</span></span><br />
<span class="sc3"> &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">desktop</span>=<span class="st0">&quot;yes&quot;</span></span><br />
<span class="sc3"> &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">applications</span>=<span class="st0">&quot;no&quot;</span></span><br />
<span class="sc3"> &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">startMenu</span>=<span class="st0">&quot;yes&quot;</span></span><br />
<span class="sc3"> &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">startup</span>=<span class="st0">&quot;no&quot;</span></span><br />
<span class="sc3"> &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">target</span>=<span class="st0">&quot;$INSTALL_PATH\SoftwarePassionHelloIzPack.jar&quot;</span></span><br />
<span class="sc3"> &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">commandLine</span>=<span class="st0">&quot;&quot;</span></span><br />
<span class="sc3"> &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">description</span>=<span class="st0">&quot;Software Passion Example App&quot;</span></span><br />
<span class="sc3"> &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">iconFile</span>=<span class="st0">&quot;$INSTALL_PATH\exe.ico&quot;</span></span><br />
<span class="sc3"> &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">iconIndex</span>=<span class="st0">&quot;0&quot;</span></span><br />
<span class="sc3"> &nbsp; &nbsp; &nbsp; &nbsp; <span class="re0">initialState</span>=<span class="st0">&quot;noShow&quot;</span><span class="re2">&gt;</span></span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="sc3"><span class="re1">&lt;createForPack</span> <span class="re0">name</span>=<span class="st0">&quot;Base&quot;</span><span class="re2">/&gt;</span></span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp;<span class="sc3"><span class="re1">&lt;/shortcut<span class="re2">&gt;</span></span></span><br />
&nbsp;<br />
<br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;shortcut</span></span><br />
<span class="sc3"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="re0">name</span>=<span class="st0">&quot;Software Passion Example App Uninstaller&quot;</span></span><br />
<span class="sc3"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="re0">programGroup</span>=<span class="st0">&quot;yes&quot;</span></span><br />
<span class="sc3"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="re0">desktop</span>=<span class="st0">&quot;no&quot;</span></span><br />
<span class="sc3"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="re0">applications</span>=<span class="st0">&quot;no&quot;</span></span><br />
<span class="sc3"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="re0">startMenu</span>=<span class="st0">&quot;no&quot;</span></span><br />
<span class="sc3"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="re0">startup</span>=<span class="st0">&quot;no&quot;</span></span><br />
<span class="sc3"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="re0">target</span>=<span class="st0">&quot;$INSTALL_PATH\Uninstaller\uninstaller.jar&quot;</span></span><br />
<span class="sc3"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="re0">commandLine</span>=<span class="st0">&quot;&quot;</span></span><br />
<span class="sc3"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="re0">iconFile</span>=<span class="st0">&quot;%SystemRoot%\system32\SHELL32.dll&quot;</span></span><br />
<span class="sc3"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="re0">iconIndex</span>=<span class="st0">&quot;31&quot;</span></span><br />
<span class="sc3"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="re0">description</span>=<span class="st0">&quot;Uninstall SoftwarePassion Example&quot;</span><span class="re2">&gt;</span></span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;createForPack</span> <span class="re0">name</span>=<span class="st0">&quot;Base&quot;</span><span class="re2">/&gt;</span></span><br />
&nbsp; &nbsp; <span class="sc3"><span class="re1">&lt;/shortcut<span class="re2">&gt;</span></span></span><br />
<br />
<span class="sc3"><span class="re1">&lt;/shortcuts<span class="re2">&gt;</span></span></span></div></div>
<p>8. Example installation script contains both Readme.txt and Licence.txt which you can add to your &#8217;softwarepassion&#8217; folder.<br />
9. Once you have it all in one place, you should have a structure like in the following screenshot:</p>
<p><a href="http://softwarepassion.s3.amazonaws.com/wp-content/uploads/izpack_directory.png" rel="lightbox[341]"><img src="http://softwarepassion.s3.amazonaws.com/wp-content/uploads/izpack_directory-300x168.png" alt="izpack_directory" title="izpack_directory" width="300" height="168" class="aligncenter size-medium wp-image-342" /></a></p>
<p>10. Now assuming that your &#8217;softwarepassion&#8217; folder has been placed directly on the c: drive, execute the following command:</p>
<div class="codecolorer-container bash " style="overflow:auto;white-space:nowrap;width:535px"><div class="bash codecolorer" style="font-family:Monaco,Lucida Console,monospace">C:\Program Files\IzPack\bin<span class="sy0">&gt;</span>compile c:\softwarepassion\install.xml <span class="re5">-b</span> c:\softwarepassion</div></div>
<p>Assuming that IzPack itself was installed at: C:\Program Files\IzPack</p>
<p>This will produce install.jar file which is your installer.</p>
<p>11. If you dont&#8217; want your end users to click on the &#8216;jar&#8217; file as not everybody knows they can do that, you can add Izpack launcher app which will launch it automatically, or use another tool to create an executable called launch4j</p>
<p>You have to admit that it was an easy one!!!!!</p>
<p>Happy Installing!<br />
<script type="text/javascript"><!--
google_ad_client = "pub-3015706834207881";
/* 468x15, utworzono 09-11-19 */
google_ad_slot = "3912330401";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
Download example files from <a href="http://www.softwarepassion.com/softwarepassion.zip">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.softwarepassion.com/deploy-your-java-application-with-izpack-installer/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Add &#8216;count #&#8217; column to JTable</title>
		<link>http://www.softwarepassion.com/add-count-column-to-jtable/</link>
		<comments>http://www.softwarepassion.com/add-count-column-to-jtable/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 14:18:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Code Snippets]]></category>
		<category><![CDATA[General Programming]]></category>
		<category><![CDATA[Graphics And Design]]></category>
		<category><![CDATA[Learning Materials]]></category>
		<category><![CDATA[count column]]></category>
		<category><![CDATA[jxtable]]></category>

		<guid isPermaLink="false">http://www.softwarepassion.com/?p=336</guid>
		<description><![CDATA[<span style="max-width: 100px; display: block; float: left;"><img src="http://softwarepassion.s3.amazonaws.com/wp-content/uploads/count_jtable_column-300x179.png" alt="jtable count column" title="jtable # column" width="100" height="100"/></span><span style="margin: 0px; padding-left: 10px; display: block; max-width: 370px; float: left;">How to add 'count#' column in JTable</span>]]></description>
			<content:encoded><![CDATA[<p>Important note first: This is mostly not my code, I was strugling with this problem for some time, I couldn&#8217;t google it at all, and one day, I&#8217;ve just found it. Now I use it in one of my projects but I cannot find the original post again, therefore I have decided to post it on my blog (slightly modified version of the original) so other people with similar problem will have a better chance of finding the solution.<br />
So, the idea is very simple. The whole point of displaying additional column which is kind of independent from the other columns is to simply use another table. This way you can sort one table by column and the number column will not sort with it. &#8211; thats exactly what I was looking for and I guess its kind of popular problem.<br />
Becouse you put two tables in one scroll pane the gui looks like its just one column!<br />
<script type="text/javascript"><!--
google_ad_client = "pub-3015706834207881";
/* 468x15, utworzono 09-11-19 */
google_ad_slot = "3912330401";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
I have created one simple method to apply this technique to any tables in my application (I use JXTable actually but JTable will do as well)</p>
<div class="codecolorer-container java " style="overflow:auto;white-space:nowrap;width:535px"><div class="java codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="kw1">private</span> <span class="kw4">void</span> addLPColumn<span class="br0">&#40;</span>JXTable table, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ajscrollpane+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">JScrollPane</span></a> scp<span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ajtable+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">JTable</span></a> rowTable <span class="sy0">=</span> <span class="kw1">new</span> RowNumberTable<span class="br0">&#40;</span>table<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; scp.<span class="me1">setRowHeaderView</span><span class="br0">&#40;</span>rowTable<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; scp.<span class="me1">setCorner</span><span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ajscrollpane+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">JScrollPane</span></a>.<span class="me1">UPPER_LEFT_CORNER</span>, rowTable.<span class="me1">getTableHeader</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; scp.<span class="me1">repaint</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span></div></div>
<p><script type="text/javascript"><!--
google_ad_client = "pub-3015706834207881";
/* 468x15, utworzono 09-11-19 */
google_ad_slot = "3912330401";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>RowNumberTable is simple one column table displaying the &#8216;count&#8217; number of rows in the second table. </p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-3015706834207881";
/* 468x15, utworzono 09-11-19 */
google_ad_slot = "3912330401";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<div class="codecolorer-container java " style="overflow:auto;white-space:nowrap;width:535px;height:300px"><div class="java codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="kw1">public</span> <span class="kw1">class</span> RowNumberTable <span class="kw1">extends</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ajtable+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">JTable</span></a><br />
&nbsp; &nbsp; <span class="kw1">implements</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Achangelistener+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">ChangeListener</span></a>, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Apropertychangelistener+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">PropertyChangeListener</span></a><br />
<span class="br0">&#123;</span><br />
&nbsp; &nbsp; <span class="kw1">private</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ajtable+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">JTable</span></a> main<span class="sy0">;</span><br />
<br />
&nbsp; &nbsp; <span class="kw1">public</span> RowNumberTable<span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ajtable+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">JTable</span></a> table<span class="br0">&#41;</span><br />
&nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; main <span class="sy0">=</span> table<span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; main.<span class="me1">addPropertyChangeListener</span><span class="br0">&#40;</span> <span class="kw1">this</span> <span class="br0">&#41;</span><span class="sy0">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; setFocusable<span class="br0">&#40;</span> <span class="kw2">false</span> <span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; setAutoCreateColumnsFromModel<span class="br0">&#40;</span> <span class="kw2">false</span> <span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; setModel<span class="br0">&#40;</span> main.<span class="me1">getModel</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; setSelectionModel<span class="br0">&#40;</span> main.<span class="me1">getSelectionModel</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#41;</span><span class="sy0">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Atablecolumn+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">TableColumn</span></a> column <span class="sy0">=</span> <span class="kw1">new</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Atablecolumn+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">TableColumn</span></a><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; column.<span class="me1">setHeaderValue</span><span class="br0">&#40;</span><span class="st0">&quot;Lp.&quot;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; addColumn<span class="br0">&#40;</span> column <span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; column.<span class="me1">setCellRenderer</span><span class="br0">&#40;</span><span class="kw1">new</span> RowNumberRenderer<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; getColumnModel<span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="me1">getColumn</span><span class="br0">&#40;</span><span class="nu0">0</span><span class="br0">&#41;</span>.<span class="me1">setPreferredWidth</span><span class="br0">&#40;</span><span class="nu0">40</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; setPreferredScrollableViewportSize<span class="br0">&#40;</span>getPreferredSize<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
<br />
&nbsp; &nbsp; @Override<br />
&nbsp; &nbsp; <span class="kw1">public</span> <span class="kw4">void</span> addNotify<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">super</span>.<span class="me1">addNotify</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Acomponent+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Component</span></a> c <span class="sy0">=</span> getParent<span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// &nbsp;Keep scrolling of the row table in sync with the main table.</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>c <span class="kw1">instanceof</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ajviewport+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">JViewport</span></a><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ajviewport+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">JViewport</span></a> viewport <span class="sy0">=</span> <span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ajviewport+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">JViewport</span></a><span class="br0">&#41;</span>c<span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; viewport.<span class="me1">addChangeListener</span><span class="br0">&#40;</span> <span class="kw1">this</span> <span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
<br />
&nbsp; &nbsp; <span class="coMULTI">/*<br />
&nbsp; &nbsp; &nbsp;* &nbsp;Delegate method to main table<br />
&nbsp; &nbsp; &nbsp;*/</span><br />
&nbsp; &nbsp; @Override<br />
&nbsp; &nbsp; <span class="kw1">public</span> <span class="kw4">int</span> getRowCount<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span><span class="br0">&#40;</span>main <span class="sy0">!=</span> <span class="kw2">null</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> main.<span class="me1">getRowCount</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <span class="nu0">0</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
<br />
&nbsp; &nbsp; @Override<br />
&nbsp; &nbsp; <span class="kw1">public</span> <span class="kw4">int</span> getRowHeight<span class="br0">&#40;</span><span class="kw4">int</span> row<span class="br0">&#41;</span><br />
&nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> main.<span class="me1">getRowHeight</span><span class="br0">&#40;</span>row<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
<br />
&nbsp; &nbsp; <span class="coMULTI">/*<br />
&nbsp; &nbsp; &nbsp;* &nbsp;This table does not use any data from the main TableModel,<br />
&nbsp; &nbsp; &nbsp;* &nbsp;so just return a value based on the row parameter.<br />
&nbsp; &nbsp; &nbsp;*/</span><br />
&nbsp; &nbsp; @Override<br />
&nbsp; &nbsp; <span class="kw1">public</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Object</span></a> getValueAt<span class="br0">&#40;</span><span class="kw4">int</span> row, <span class="kw4">int</span> column<span class="br0">&#41;</span><br />
&nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ainteger+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Integer</span></a>.<span class="me1">toString</span><span class="br0">&#40;</span>row <span class="sy0">+</span> <span class="nu0">1</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
<br />
&nbsp; &nbsp; <span class="coMULTI">/*<br />
&nbsp; &nbsp; &nbsp;* &nbsp;Don't edit data in the main TableModel by mistake<br />
&nbsp; &nbsp; &nbsp;*/</span><br />
&nbsp; &nbsp; @Override<br />
&nbsp; &nbsp; <span class="kw1">public</span> <span class="kw4">boolean</span> isCellEditable<span class="br0">&#40;</span><span class="kw4">int</span> row, <span class="kw4">int</span> column<span class="br0">&#41;</span><br />
&nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <span class="kw2">false</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="co1">//</span><br />
<span class="co1">// &nbsp;Implement the ChangeListener</span><br />
<span class="co1">//</span><br />
&nbsp; &nbsp; <span class="kw1">public</span> <span class="kw4">void</span> stateChanged<span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Achangeevent+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">ChangeEvent</span></a> e<span class="br0">&#41;</span><br />
&nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// &nbsp;Keep the scrolling of the row table in sync with main table</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ajviewport+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">JViewport</span></a> viewport <span class="sy0">=</span> <span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ajviewport+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">JViewport</span></a><span class="br0">&#41;</span> e.<span class="me1">getSource</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ajscrollpane+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">JScrollPane</span></a> scrollPane <span class="sy0">=</span> <span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ajscrollpane+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">JScrollPane</span></a><span class="br0">&#41;</span>viewport.<span class="me1">getParent</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; scrollPane.<span class="me1">getVerticalScrollBar</span><span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="me1">setValue</span><span class="br0">&#40;</span>viewport.<span class="me1">getViewPosition</span><span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="me1">y</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="co1">//</span><br />
<span class="co1">// &nbsp;Implement the PropertyChangeListener</span><br />
<span class="co1">//</span><br />
&nbsp; &nbsp; <span class="kw1">public</span> <span class="kw4">void</span> propertyChange<span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Apropertychangeevent+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">PropertyChangeEvent</span></a> e<span class="br0">&#41;</span><br />
&nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">// &nbsp;Keep the row table in sync with the main table</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="st0">&quot;selectionModel&quot;</span>.<span class="me1">equals</span><span class="br0">&#40;</span>e.<span class="me1">getPropertyName</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setSelectionModel<span class="br0">&#40;</span> main.<span class="me1">getSelectionModel</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span><span class="st0">&quot;model&quot;</span>.<span class="me1">equals</span><span class="br0">&#40;</span>e.<span class="me1">getPropertyName</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setModel<span class="br0">&#40;</span> main.<span class="me1">getModel</span><span class="br0">&#40;</span><span class="br0">&#41;</span> <span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
<br />
&nbsp; &nbsp; <span class="coMULTI">/*<br />
&nbsp; &nbsp; &nbsp;* &nbsp;Borrow the renderer from JDK1.4.2 table header<br />
&nbsp; &nbsp; &nbsp;*/</span><br />
&nbsp; &nbsp; <span class="kw1">private</span> <span class="kw1">static</span> <span class="kw1">class</span> RowNumberRenderer <span class="kw1">extends</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Adefaulttablecellrenderer+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">DefaultTableCellRenderer</span></a><br />
&nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">public</span> RowNumberRenderer<span class="br0">&#40;</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setHorizontalAlignment<span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ajlabel+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">JLabel</span></a>.<span class="me1">CENTER</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">public</span> <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Acomponent+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Component</span></a> getTableCellRendererComponent<span class="br0">&#40;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ajtable+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">JTable</span></a> table, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Aobject+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Object</span></a> value, <span class="kw4">boolean</span> isSelected, <span class="kw4">boolean</span> hasFocus, <span class="kw4">int</span> row, <span class="kw4">int</span> column<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>table <span class="sy0">!=</span> <span class="kw2">null</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ajtableheader+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">JTableHeader</span></a> header <span class="sy0">=</span> table.<span class="me1">getTableHeader</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>header <span class="sy0">!=</span> <span class="kw2">null</span><span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setForeground<span class="br0">&#40;</span>header.<span class="me1">getForeground</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setBackground<span class="br0">&#40;</span>header.<span class="me1">getBackground</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setFont<span class="br0">&#40;</span>header.<span class="me1">getFont</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>isSelected<span class="br0">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setFont<span class="br0">&#40;</span> getFont<span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="me1">deriveFont</span><span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Afont+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Font</span></a>.<span class="me1">BOLD</span><span class="br0">&#41;</span> <span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setText<span class="br0">&#40;</span><span class="br0">&#40;</span>value <span class="sy0">==</span> <span class="kw2">null</span><span class="br0">&#41;</span> <span class="sy0">?</span> <span class="st0">&quot;&quot;</span> <span class="sy0">:</span> value.<span class="me1">toString</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setBorder<span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Auimanager+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">UIManager</span></a>.<span class="me1">getBorder</span><span class="br0">&#40;</span><span class="st0">&quot;TableHeader.cellBorder&quot;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <span class="kw1">this</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span><br />
<span class="br0">&#125;</span></div></div>
<p><a href="http://softwarepassion.s3.amazonaws.com/wp-content/uploads/count_jtable_column.png" rel="lightbox[336]"><img src="http://softwarepassion.s3.amazonaws.com/wp-content/uploads/count_jtable_column-300x179.png" alt="count_jtable_column" title="count_jtable_column" width="300" height="179" class="aligncenter size-medium wp-image-337" /></a></p>
<p>In my case the &#8216;count&#8217; column is called &#8216;Lp.&#8217; &#8211; in polish </p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-3015706834207881";
/* 468x15, utworzono 09-11-19 */
google_ad_slot = "3912330401";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
I have created one simple method to apply this technique to any tables in my application (I use JXTable actually but JTable will do as well)</p>
<div class="codecolorer-container java " style="overflow:auto;white-space:nowrap;width:535px"><div class="java codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="kw1">private</span> <span class="kw4">void</span> addLPColumn<span class="br0">&#40;</span>JXTable table, <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ajscrollpane+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">JScrollPane</span></a> scp<span class="br0">&#41;</span><span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ajtable+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">JTable</span></a> rowTable <span class="sy0">=</span> <span class="kw1">new</span> RowNumberTable<span class="br0">&#40;</span>table<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; scp.<span class="me1">setRowHeaderView</span><span class="br0">&#40;</span>rowTable<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; scp.<span class="me1">setCorner</span><span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ajscrollpane+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">JScrollPane</span></a>.<span class="me1">UPPER_LEFT_CORNER</span>, rowTable.<span class="me1">getTableHeader</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; scp.<span class="me1">repaint</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span></div></div>
<p><script type="text/javascript"><!--
google_ad_client = "pub-3015706834207881";
/* 468x15, utworzono 09-11-19 */
google_ad_slot = "3912330401";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.softwarepassion.com/add-count-column-to-jtable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JXTable and primary key &#8211; how to.</title>
		<link>http://www.softwarepassion.com/jxtable-and-primary-key-how-to/</link>
		<comments>http://www.softwarepassion.com/jxtable-and-primary-key-how-to/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 11:42:47 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General Programming]]></category>
		<category><![CDATA[jxtable]]></category>
		<category><![CDATA[primary key]]></category>
		<category><![CDATA[swing]]></category>
		<category><![CDATA[swinglabs]]></category>

		<guid isPermaLink="false">http://www.softwarepassion.com/?p=328</guid>
		<description><![CDATA[<span style="max-width: 100px; display: block; float: left;"><img src="http://softwarepassion.s3.amazonaws.com/wp-content/uploads/swinglabs-150x116.png" alt="jxtable and primary key" title="jxtable" width="100" height="100"/></span><span style="margin: 0px; padding-left: 10px; display: block; max-width: 370px; float: left;">This is a short tutorial on how to get the primary key of the object displayed as JXTable row.</span>]]></description>
			<content:encoded><![CDATA[<p><a href="http://softwarepassion.s3.amazonaws.com/wp-content/uploads/swinglabs.png" rel="lightbox[328]"><img src="http://softwarepassion.s3.amazonaws.com/wp-content/uploads/swinglabs-150x116.png" alt="swinglabs" title="swinglabs" width="150" height="116" class="alignleft size-thumbnail wp-image-330" /></a><br />
Today I will describe in a few words and a couple lines of code how to get the id of the row in JXTable. When working with data coming from database we don&#8217;t really want to display the primary key of the object but to hide it. This can cause a small problem once we want to find out for example which item was clicked, ok we can easily find out which row it was but its not always easy to find out which actual object it was especially when using JXTable sorting capabilities.<br />
The whole trick is to get the the corresponding object from the model and not from the view.<br />
Here is a short code snippet to do just that, hope that helps everyone who uses great JXTable component to display some data.<br />
<script type="text/javascript"><!--
google_ad_client = "pub-3015706834207881";
/* 468x15, utworzono 09-11-19 */
google_ad_slot = "3912330401";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<div class="codecolorer-container java " style="overflow:auto;white-space:nowrap;width:535px"><div class="java codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="kw1">private</span> <span class="kw4">int</span> getObjectID<span class="br0">&#40;</span>JXTable table<span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw4">int</span> rowx <span class="sy0">=</span> table.<span class="me1">getSelectedRow</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw4">int</span> resultx <span class="sy0">=</span> <span class="nu0">0</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">if</span> <span class="br0">&#40;</span>rowx <span class="sy0">&lt;</span> <span class="nu0">0</span><span class="br0">&#41;</span> <span class="br0">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> <span class="nu0">0</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="br0">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; resultx <span class="sy0">=</span> table.<span class="me1">convertRowIndexToModel</span><span class="br0">&#40;</span>rowx<span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw4">int</span> id <span class="sy0">=</span> <span class="br0">&#40;</span><a href="http://www.google.com/search?hl=en&amp;q=allinurl%3Ainteger+java.sun.com&amp;btnI=I%27m%20Feeling%20Lucky"><span class="kw3">Integer</span></a><span class="br0">&#41;</span> table.<span class="me1">getModel</span><span class="br0">&#40;</span><span class="br0">&#41;</span>.<span class="me1">getValueAt</span><span class="br0">&#40;</span>resultx, <span class="nu0">0</span><span class="br0">&#41;</span><span class="sy0">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">return</span> id<span class="sy0">;</span><br />
&nbsp; &nbsp; <span class="br0">&#125;</span></div></div>
<p>This works of course assuming that your object index is set as first column in your model (position 0).<br />
<script type="text/javascript"><!--
google_ad_client = "pub-3015706834207881";
/* 468x15, utworzono 09-11-19 */
google_ad_slot = "3912330401";
google_ad_width = 468;
google_ad_height = 15;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.softwarepassion.com/jxtable-and-primary-key-how-to/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up Android development platform on Ubuntu Linux 9.04</title>
		<link>http://www.softwarepassion.com/setting-up-android-development-platform-on-ubuntu-linux-904/</link>
		<comments>http://www.softwarepassion.com/setting-up-android-development-platform-on-ubuntu-linux-904/#comments</comments>
		<pubDate>Tue, 12 May 2009 10:05:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General Programming]]></category>
		<category><![CDATA[System Administration]]></category>

		<guid isPermaLink="false">http://www.softwarepassion.com/?p=176</guid>
		<description><![CDATA[<span style="max-width: 100px; display: block; float: left;"><img src="http://www.softwarepassion.com/wp-content/uploads/android.png" alt="android" title="android"/></span><span style="margin-bottom: 5px; padding-left: 10px; display: block; max-width: 370px; float: left;">In this post I will go step by step through the setup of your development box for Android and all its goodness.                     
</span>]]></description>
			<content:encoded><![CDATA[<p>In this post I will go step by step through the setup of your development box for Android and all its goodness. I start with fresh install of the newest and shinest Ubuntu platform 9.04, which by the way on the first look is just great. I&#8217;m a happy owner of G1 for a few months and this is the best phone I ever had so why not start writing some software on it!</p>
<p><strong>Step One.</strong></p>
<p>Before installing anything please run the following command (actually 2 commands)</p>
<div class="codecolorer-container bash " style="overflow:auto;white-space:nowrap;width:535px"><div class="bash codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="kw2">sudo</span> <span class="kw2">apt-get</span> update <span class="sy0">&amp;&amp;</span> <span class="kw2">sudo</span> <span class="kw2">apt-get</span> upgrade</div></div>
<p>Install Java! You develop on android or not Java is a must on all my machines <img src='http://www.softwarepassion.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div class="codecolorer-container bash " style="overflow:auto;white-space:nowrap;width:535px"><div class="bash codecolorer" style="font-family:Monaco,Lucida Console,monospace">$ <span class="kw2">sudo</span> <span class="kw2">apt-get</span> <span class="kw2">install</span> sun-java6-jdk</div></div>
<p>You can now check your java installation by issuing two commands:</p>
<div class="codecolorer-container bash " style="overflow:auto;white-space:nowrap;width:535px"><div class="bash codecolorer" style="font-family:Monaco,Lucida Console,monospace">$ java <span class="re5">-version</span></div></div>
<div class="codecolorer-container bash " style="overflow:auto;white-space:nowrap;width:535px"><div class="bash codecolorer" style="font-family:Monaco,Lucida Console,monospace">$ javac <span class="re5">-version</span></div></div>
<p>You should be able to see output stating that you have java 6 installed, huuraaayy!</p>
<p><strong>Step Two.</strong></p>
<p>Download and install Android SDK<br />
You can download the latest android SDK from the android development website (developer.android.com), the link to the latest version is <a href="http://developer.android.com/sdk/1.5_r1/index.html">here</a><br />
After your download completes, unzip the file to the directory of your choice. I copy the whole folder into my home directory but the doesn&#8217;t really matter.<br />
Open up your favourite text editor (VIM of course) and add the following line at the very bottom of the .bashrc file:</p>
<div class="codecolorer-container bash " style="overflow:auto;white-space:nowrap;width:535px"><div class="bash codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="kw3">export</span> <span class="re2">PATH</span>=<span class="co1">${PATH}</span>:<span class="sy0">/</span>home<span class="sy0">/</span>kris<span class="sy0">/</span>android-sdk-linux_x86-<span class="nu0">1.5</span>_r1<span class="sy0">/</span>tools</div></div>
<p><strong>Stepp Three</strong></p>
<p>Download and Install Eclipse</p>
<p>I wish I could go for the easy one here and download the version using apt-get but unfortunately not as the version in repos is 3.2 and ADT plugin requires version 3.3 or higher. You have to download the eclipse for www.eclipse.org and unpack it. Once unpacked its ready to use!</p>
<p><strong>Step Four</strong></p>
<p>Download and install Eclipse plugin<br />
This is instruction from the developer.android.com with one small modification, instead of https use http:</p>
<blockquote><p>
   1.  Start Eclipse, then select Help > Software Updates&#8230;.<br />
   2. In the dialog that appears, click the Available Software tab.<br />
   3. Click Add Site&#8230;<br />
   4. Enter the Location:</p>
<p>      <strong>http://dl-ssl.google.com/android/eclipse/<br />
</strong><br />
      If you have trouble aqcuiring the plugin, try using &#8220;http&#8221; in the Location URL, instead of &#8220;https&#8221; (https is preferred for security reasons).</p>
<p>      Click OK.<br />
   5. Back in the Available Software view, you should see the plugin listed by the URL, with &#8220;Developer Tools&#8221; nested within it. Select the checkbox next to Developer Tools and click Install&#8230;<br />
   6. On the subsequent Install window, &#8220;Android DDMS&#8221; and &#8220;Android Development Tools&#8221; should both be checked. Click Next.<br />
   7. Read and accept the license agreement, then click Finish.<br />
   8. Restart Eclipse.</p>
</blockquote>
<p>After executing all the steps above you are ready for Android development. The last step in this tutorial is to run example android projects on your linux dev machine.<br />
If you encounter an error saying :</p>
<p>An error occurred during provisioning.<br />
Cannot connect to keystore.<br />
JKS</p>
<p>Please check your java version. If its set to 1.5 than please run the following command:</p>
<div class="codecolorer-container bash " style="overflow:auto;white-space:nowrap;width:535px"><div class="bash codecolorer" style="font-family:Monaco,Lucida Console,monospace"><span class="kw2">sudo</span> update-java-alternatives <span class="re5">-s</span> java-<span class="nu0">6</span>-sun</div></div>
<p>Once you finish installing required plugins, restart your eclipse and go to Window->Preferences->Android and set up a path to your android SDK</p>
<p><strong>Step Five</strong></p>
<p>Check your configuration</p>
<p>If all went fine you can try to develop Hello World application in android. You can find the instruction on the android development site:<br />
<a href="http://developer.android.com/guide/tutorials/hello-world.html">http://developer.android.com/guide/tutorials/hello-world.html</a></p>
<p>More android tutorials to come!<br />
Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.softwarepassion.com/setting-up-android-development-platform-on-ubuntu-linux-904/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Affirma S3 library for C#</title>
		<link>http://www.softwarepassion.com/affirma-s3-library-for-c/</link>
		<comments>http://www.softwarepassion.com/affirma-s3-library-for-c/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 12:20:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[General Programming]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.softwarepassion.com/?p=70</guid>
		<description><![CDATA[Finally I have found S3 library that works in C#. The library was written by Joel Wetzel from Affirma Consulting and I just wanted to spread the word about it.
Once downloaded you are presented with the whole C# Visual Studio solution which contains the library project as well as some example on how to use [...]]]></description>
			<content:encoded><![CDATA[<p>Finally I have found S3 library that works in C#. The library was written by Joel Wetzel from Affirma Consulting and I just wanted to spread the word about it.<br />
Once downloaded you are presented with the whole C# Visual Studio solution which contains the library project as well as some example on how to use it.<br />
There is even a simple wrapper written which greatly simplyfies the use of the affirma&#8217;s library.<br />
As an example:<br />
1. Create wrapper object (constructor listed)</p>
<pre>
<div class="codecolorer-container text " style="overflow:auto;white-space:nowrap;width:535px"><div class="text codecolorer" style="font-family:Monaco,Lucida Console,monospace">public ThreeSharpWrapper(String awsAccessKeyId, String awsSecretAccessKey)<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; this.config = new ThreeSharpConfig();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; this.config.AwsAccessKeyID = awsAccessKeyId;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; this.config.AwsSecretAccessKey = awsSecretAccessKey;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; this.service = new ThreeSharpQuery(this.config);<br />
&nbsp; &nbsp; &nbsp; &nbsp; }</div></div>
</pre>
<p>and then use it having the following methods:</p>
<pre>
<div class="codecolorer-container text " style="overflow:auto;white-space:nowrap;width:535px;height:300px"><div class="text codecolorer" style="font-family:Monaco,Lucida Console,monospace">/// Adds a bucket to an S3 account<br />
public void AddBucket(String bucketName);<br />
<br />
&nbsp;/// Returns a string of XML, describing the contents of a bucket<br />
public String ListBucket(String bucketName);<br />
<br />
/// Adds a string to a bucket, as an object<br />
public void AddStringObject(String bucketName, String keyName, String data);<br />
<br />
/// Streams a file to a bucket as an object<br />
public void AddFileObject(String bucketName, String keyName, String localfile);<br />
<br />
/// Streams a file to a bucket as an object, with encryption<br />
public void AddEncryptFileObject(String bucketName, String keyName, String localfile, String encryptionKey, String encryptionIV);<br />
<br />
/// Gets a string object from a bucket, and returns it as a String<br />
public String GetStringObject(String bucketName, String keyName);<br />
<br />
/// Gets a file object from a bucket, and streams it to disk<br />
public void GetFileObject(String bucketName, String keyName, String localfile);<br />
<br />
/// Gets a file object from a bucket, streaming it to disk, with decryption<br />
public void GetDecryptFileObject(String bucketName, String keyName, String localfile, String encryptionKey, String encryptionIV);<br />
<br />
/// Copies an object from a source location to a destination location<br />
public void CopyObject(String sourceBucketName, String sourceKey, String destinationBucketName, String destinationKey);<br />
<br />
/// Generates a URL to access an S3 object in a bucket<br />
public String GetUrl(String bucketName, String keyName);<br />
<br />
/// Deletes an object from a bucket<br />
public void DeleteObject(String bucketName, String keyName);<br />
<br />
/// Deletes a bucket from an S3 account<br />
public void DeleteBucket(String bucketName);<br />
<br />
/// Changes the request payer value for the specified bucket<br />
public String PaymentChange(String bucketName, PaymentChangeRequest.Payer payer);<br />
<br />
/// Gets the request payer value for the specified bucket<br />
public String PaymentGet(String bucketName);</div></div>
</pre>
<p>The library is dead easy to use and most importantly it works (comparing to other S3 libraries I&#8217;ve found). Great work Joel!<br />
You can download the solution zip from <a href="http://storage43.com/file/show/47">here</a> or directly from the codeplex hosting the project <a href="http://threesharp.codeplex.com/">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.softwarepassion.com/affirma-s3-library-for-c/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Do we really need stackoverflow?</title>
		<link>http://www.softwarepassion.com/do-we-really-need-stackoverflow/</link>
		<comments>http://www.softwarepassion.com/do-we-really-need-stackoverflow/#comments</comments>
		<pubDate>Sun, 04 May 2008 22:57:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General Programming]]></category>

		<guid isPermaLink="false">http://softwarepassion.com/?p=33</guid>
		<description><![CDATA[Uhhh, ohhh, have you seen or rather heard about stackoverflow.com? If not, you are probably just a medicore programmer and don&#8217;t follow the newest stuff happening on the net! (just kidding). For those who never heard, stackoverflow.com is a new web site, kind of a forum which doesn&#8217;t exist yet, but will be created (no [...]]]></description>
			<content:encoded><![CDATA[<p>Uhhh, ohhh, have you seen or rather heard about stackoverflow.com? If not, you are probably just a medicore programmer and don&#8217;t follow the newest stuff happening on the net! (just kidding). For those who never heard, stackoverflow.com is a new web site, kind of a forum which doesn&#8217;t exist yet, but will be created (no one knows when but sometime in the future). The site is an idea of Joel Spolsky and Jeff Atwood. If at least one of those names ring the bell in your head, well, maybe you are not that bad programmer after all <img src='http://www.softwarepassion.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . Personally, I have never heard about Jeff but after I googled his blog I have to admit, I see this blog quite often. Talking about Joel, well, he is kind of my guru, I read his blog regularly and got his book even, but the whole stackoverflow.com idea for me, is exactly what it says, it is just a kind of internet overflow, another forum on the net. The only positive thing I can think of, is just a great promotion this site has. I like the guys but are they serious? Are they going to create another programming forum?<br />The site doesn&#8217;t exist yet (just a welcome page so far) but you can listen to their podcasts to get an &#8216;understanding&#8217; of the whole idea. I have heard all three podcasts so far, beside the fact, that they don&#8217;t work on my shuffle ipod, I can only say this is nothing new or innovative.<br />I was thinking about it and I think, I know why they do this! If you know Joel a bit and you hear Jeff or read his blog, you will quickly understand that they technology of choice is .NET, one might argue that no, no Joel thinks about Mono, has his own &#8216;wasabi&#8217; staff but hey, everyone has to concentrate on something on the daily basis and their choice is .Net, correct me if I&#8217;m wrong.<br />If you have ever programmed in more &#8216;open&#8217; languages like Java or straight C/C++ you know what is the real power of the language &#8211; COMMUNITY. I do program a bit in C# for a year now and I really like it but when you look for a solution to the problem you either find something very old or have to stick to MSDN, there is no community, it feels like if you are on your own, and that makes me do everything to not to program in .Net. <br />Perfect example Sun Java Forum, I grow up on this forum, in my opinion is the best programming forum ever created with its duke dollars and vivid community.<br />Do you think they can do something better that that, well I hope to be surprised but to be frank, I don&#8217;t think so, I think it is just a crazy (although successfull) FogCreek products promotion.<br />Am I wrong? What do you think?</p>
<p>You can listen to the podcast and read comments at: <a href="http://blog.stackoverflow.com/">http://blog.stackoverflow.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.softwarepassion.com/do-we-really-need-stackoverflow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Crocodile Reader Project Started</title>
		<link>http://www.softwarepassion.com/crocodile-reader-project-started/</link>
		<comments>http://www.softwarepassion.com/crocodile-reader-project-started/#comments</comments>
		<pubDate>Tue, 01 Apr 2008 17:58:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[General Programming]]></category>

		<guid isPermaLink="false">http://softwarepassion.com/?p=32</guid>
		<description><![CDATA[My first C# open source project has been officially started. The project is named Crocodile and was created to read my feeds while on the tube (If you live in London like me or any other city with underground trains you know the pain). I belive that the whole RSS/Atom idea is great and allows [...]]]></description>
			<content:encoded><![CDATA[<p>My first C# open source project has been officially started. The project is named Crocodile and was created to read my feeds while on the tube (If you live in London like me or any other city with underground trains you know the pain). I belive that the whole RSS/Atom idea is great and allows me to gather everything, what I want to read on the net, in one place, but some things were annoying me and that&#8217;s why I come up with the Crocodile. First of all I couldn&#8217;t find any feed reader to download the feeds for me in a way I want them to be downloaded (more on that in a sec), secondly my favourite feed from DZone includes the link not to the web page I want to actually read but to DZone web page with small description (same as in the feed) and a thumbnail/link to the original, submitted web page. Dzone (www.dzone.com) feeds annoyed me so much that this was one of the main reasons I have started the whole Crocodile idea. So what the Crocodile is? Its very simple and small app using browser component found in .Net to see the pages associaged with the feed. The idea is to download the whole pages together with css, js etc and save them for offline browsing. So far the project is still in alpha but it works to the degree making the app usable. Nothing special in that so far but the best idea is the feature called &#8216;Cleaners&#8217; and &#8216;Filters&#8217;. Cleaners (works so far only for DZone and is completly hardcoded) convert the link found in the feed to the original page submitted to dzone website &#8211; if you use DZone you know what I mean) and displays the original web sites instead of full of adverts DZone pages. Second idea called &#8216;Filters&#8217; not implemented yet at all, would parse all feed items descriptions and display only the feeds filtered with keywords previously entered by the user.<br />For anyone interested please visit the project web site: <a href="http://crocodile.sourceforge.net/">http://crocodile.sourceforge.net</a>.</p>
<p>Short tutorial for all offline <span style="font-weight: bold;">DZone</span> fans:
<ol>
<li>Install the Crocodile app found at http://crocodile.sourceforge.net</li>
<li>Run .msi installer and keep pressing next (nothing special here)</li>
<li>When you run Crocodile, click on the small cross green button to add new subscription</li>
<li>Enter <span style="font-weight: bold;">&#8216;dzone&#8217; </span>in the subscription name and <span style="font-weight: bold;">&#8216;http://feeds.dzone.com/dzone/frontpage?format=xml&#8217; </span>as the url address</li>
<li>Confirm by clicking &#8216;Ok&#8217;</li>
<li>In your subscriptions panel click<span style="font-weight: bold;"> &#8216;dzone&#8217; </span>and wait for your feed items to be populated.</li>
<li>Clicking on each item would display the page associated with the feed item</li>
<li>Click orange up arrow button to &#8216;Clean&#8217;. This will convert all links found in the feed to links pointing to original web sites submitted to Dzone</li>
<li>Now you are ready to browse the original pages submitted to Dzone by clicking on each feed item found in the list.</li>
<li>You can download the pages for offline browsing (pages are saved as .mht archives).</li>
<li>Minimizing Crocodile puts it in the system tray where it updates the feeds periodically.</li>
</ol>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_SjX7MIMF_HI/R_KBlVmryiI/AAAAAAAAAKg/K-Szd8yxDu0/s1600-h/crocodileinstruction.png" rel="lightbox[32]"><img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_SjX7MIMF_HI/R_KBlVmryiI/AAAAAAAAAKg/K-Szd8yxDu0/s400/crocodileinstruction.png" alt="" id="BLOGGER_PHOTO_ID_5184348599511403042" border="0" /></a><br />Full applicaton screenshot is available from <a href="http://crocodile.sourceforge.net/images/crocodile.PNG" rel="lightbox[32]">sourceforge</a>.</p>
<p> Please be aware that this software has just been born and is quite messy (sometimes crashes, sometimes behaves strangely) I just wanted to share the dzone feature as quickly as I have made it and it works for me. If you want to share your time on Crocodile development please contact me either through this blog or sourcefoge web site any help would be appreciated. The Crocodile sources are available from svn repo.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.softwarepassion.com/crocodile-reader-project-started/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
