<?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>simonpena.com &#187; OS X</title>
	<atom:link href="http://simonpena.com/blog/tag/os-x/feed/" rel="self" type="application/rss+xml" />
	<link>http://simonpena.com/blog</link>
	<description>Una mezcla heterogénea de tecnología y desvaríos</description>
	<lastBuildDate>Sun, 13 May 2012 12:37:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Swing JTable</title>
		<link>http://simonpena.com/blog/proyectos/pennybank/swing-jtable/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=swing-jtable</link>
		<comments>http://simonpena.com/blog/proyectos/pennybank/swing-jtable/#comments</comments>
		<pubDate>Sun, 15 Mar 2009 08:15:25 +0000</pubDate>
		<dc:creator>Simón</dc:creator>
				<category><![CDATA[Pennybank]]></category>
		<category><![CDATA[implementation]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://pennybank.wordpress.com/?p=59</guid>
		<description><![CDATA[Some links about Swing JTable, and TableModel<div class="addthis_toolbox addthis_default_style " addthis:url='http://simonpena.com/blog/proyectos/pennybank/swing-jtable/' addthis:title='Swing JTable '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></description>
			<content:encoded><![CDATA[<p>I've been working hard these days, and I almost have an usable version of PennyBank. Right now, users are able to create and delete users and accounts, operate with those accounts (deposit, withdraw and transfer), displaying account operations, and importing movements from <a title="Cashbox" href="http://www.fadingred.com/cashbox/" target="_blank">Cashbox</a> PList files.</p>
<p>I will provide with some screen-shots as soon as possible, but today I wanted to talk about Swing <a title="How to Use JTables" href="http://java.sun.com/docs/books/tutorial/uiswing/components/table.html" target="_blank">JTables</a> and their <a title="Creating a Table Model" href="http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#data" target="_blank">TableModel</a> property. Tables are great tools when you need to display a collection of data, so you can arrange it in rows (one row per element in the collection) and columns (one column per attribute in the element).</p>
<p>JTables are quite easy to use. You need to declare the table itself, give it a model, and display it in your panel. Depending on the model you choose, you can edit the table's cells, you can display the elements according to their type...</p>
<p>Even when Sun's tutorial is nice enough to have the basic necessities solved, these three articles I found on <a title="InformIT" href="http://www.informit.com/" target="_blank">InformIT</a> are very good pointing at the changes you may probably want to do with your tables:</p>
<ul>
<li><a title="Creating a Custom Java Swing TableModel" href="http://www.informit.com/articles/article.aspx?p=332278" target="_blank">Creating a Custom Java Swing TableModel</a></li>
<li><a title="Building a Profesional Swing JTable" href="http://www.informit.com/articles/article.aspx?p=333472" target="_blank">Building a Professional Swing JTable</a></li>
<li><a title="Sortable Swing JTable" href="http://www.informit.com/articles/article.aspx?p=337310" target="_blank">Sortable Swing JTable</a></li>
</ul>
<p>Now, I still have to give my table the OS X standard Look &amp; Feel, painting even and odd rows with different colors each one. <a title="How to add zebra background stripes to a JTable" href="http://nadeausoftware.com/articles/2008/01/java_tip_how_add_zebra_background_stripes_jtable" target="_blank">This link</a> provides some good steps to accomplish that task.</p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://simonpena.com/blog/proyectos/pennybank/swing-jtable/' addthis:title='Swing JTable '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://simonpena.com/blog/proyectos/pennybank/swing-jtable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some (unasked) explanations</title>
		<link>http://simonpena.com/blog/proyectos/pennybank/some-unasked-explanations/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=some-unasked-explanations</link>
		<comments>http://simonpena.com/blog/proyectos/pennybank/some-unasked-explanations/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 00:11:42 +0000</pubDate>
		<dc:creator>Simón</dc:creator>
				<category><![CDATA[Pennybank]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://pennybank.wordpress.com/?p=52</guid>
		<description><![CDATA[In occasions, the amount of time spent actually developing an application is less than the time spent thinking how to do it.<div class="addthis_toolbox addthis_default_style " addthis:url='http://simonpena.com/blog/proyectos/pennybank/some-unasked-explanations/' addthis:title='Some (unasked) explanations '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></description>
			<content:encoded><![CDATA[<p>When I started  developing PennyBank, the first decision I faced was the programming language I should use. I wanted something that looked integrated in the system, like iTunes, Mail, iCal... The first choice was obviously  <a title="Objective-C" href="http://en.wikipedia.org/wiki/Objective-C" target="_blank">Objective-C</a>, with the interface done in <a title="Interface Builder" href="http://developer.apple.com/tools/interfacebuilder.html" target="_blank">Interface Builder</a>. I had followed a small tutorial, and doing a trivial application (a calculator, I think) had showed me how good its visual programming was.</p>
<p>In my job I work using <a title="C# Programming Language" href="http://en.wikipedia.org/wiki/C_Sharp_(programming_language)" target="_blank">C#</a> with <a title="Visual Studio" href="http://msdn.microsoft.com/en-us/vstudio/default.aspx" target="_blank">Visual Studio 2008</a>. I can develop <a title="Graphical user interface" href="http://en.wikipedia.org/wiki/Graphical_user_interface" target="_blank">GUIs</a> real quickly, without having to withdraw time from what it is usually more important: the business logic. Here, I wanted more or less the same. I wanted a language which could let me focus on the logic without too many headaches when doing the GUI. So Objective-C seemed the right option, as there was that Interface Builder tool. But after just some searches in Google, I realized that I wouldn't be able to get the application done if I chose a language I was not familiar with.</p>
<p>And so I chose Java. I've done many small apps in Java when I was studying, so I feel quite familiar with it. Besides, I wanted to try <a title="Hibernate" href="http://www.hibernate.org/" target="_blank">Hibernate</a>, so this seemed a very good excuse. The other reason to choose Java was SWT. Some friends and I developed an application last year using <a title="The Standard Widget Tool" href="http://www.eclipse.org/swt/" target="_blank">SWT</a>. We were targeting Windows, but I recall reading that SWT was "the ultimate Java interface" in terms of native <a title="Look and feel" href="http://en.wikipedia.org/wiki/Look_and_feel" target="_blank">Look &amp; Feel</a> integration. As our application got to look great in Windows, I started coding in Java with the idea that SWT would save all my problems.</p>
<p>I was wrong. After two weeks developing the model layer with Hibernate, I wrote the first lines of code for the GUI. It was quite strange: I needed several days to notice that something was going wrong. The first days it was due to the following: <em> </em></p>
<blockquote><p><em>The special VM option     <strong><tt>-XstartOnFirstThread</tt></strong> is also required for SWT applications     to run properly on the Mac.</em></p></blockquote>
<p>It is stated clearly in the <a title="Deploying SWT Applications on Mac OS X" href="http://www.eclipse.org/swt/macosx/" target="_blank">Mac OS X section</a> of their page, but somehow I didn't read it, experiencing some real awful exceptions until I found it. After that, I had several issues that almost have PennyBank development stopped. First of all was the lack of a good Visual Editor in Eclipse. OK, there was the <a title="Visual Editor plug-in" href="http://www.eclipse.org/vep/WebContent/main.php" target="_blank">Visual Editor plug-in</a> , but I wasn't able to get it working:  its support seemed to have been dropped off, and there was no sign of activity in its section for the last two years (Jump <a href="#veplugin">here</a> if you don't want to read the rest and want to find which solution I found). After that, I wrote the first example of a toolbar.</p>
<p>It was... weird. I was looking at the main window, knowing that something wasn't right, but unable to tell what it was. The toolbar! This was NOT an OS X toolbar!After that, I knew that I had no reason to keep using SWT, as it wasn't giving me the integration I was expecting, nor it was giving me any ease of visual programming. I found a blog where someone built an  <a title="Making SWT look more native on Mac OS" href="http://blog.laurentm.com/2008/07/making-swt-look-more-native-on-mac-os/">unified tool bar using SWT</a>, but it looked too much of a hacking for me. So I moved to <a title="Netbeans" href="http://www.netbeans.org/" target="_blank">Netbeans</a>: I knew it had a <a title="Matisse on Netbeans" href="http://www.netbeans.org/kb/trails/matisse.html" target="_blank">tool for writing GUIs</a> so even if I would be coding a <em>not-so-nice</em> application, at least it would be faster.</p>
<p>Using <a title="Maven" href="http://maven.apache.org/" target="_blank">Maven</a> proved here to be a very wise decision: migrating from an IDE to the other was painless. But I didn't stay with Netbeans too much: after an strange problem with Subversion, I moved back to <a title="Eclipse" href="http://www.eclipse.org/" target="_blank">Eclipse</a>. At the beginning, I even thought about developing the interface by hand. Fortunately, I found a better solution.</p>
<p><a name="veplugin"></a>Even if the plug-in was officially unsupported, in <a title="Visual Editor plug-in" href="http://wiki.eclipse.org/VE/Update" target="_blank">this page</a> a link is provided to have it working under the last Eclipse build. Now that I was able to do visual programming, the only point missing was the so much wanted operative system integration.</p>
<p>So I started searching for <em>"Java OS X integration"</em>, finding lots of resources... until I found The One. <a title="Exploding Pixels" href="http://explodingpixels.wordpress.com/" target="_blank">Exploding Pixels</a> writer has developed <a title="Mac Widgets for Java" href="http://code.google.com/p/macwidgets/" target="_blank">Mac Widgets for Java</a>: some great widgets which gives the application a native look and feel. Another <em>must have</em> link is the <a title="Java Development Guide for Mac OS X" href="http://developer.apple.com/documentation/Java/Conceptual/Java14Development/index.html" target="_blank">Java Development Guide for Mac OS X</a>. With this one and the <a title="Apple Human Interface Guidelines" href="http://developer.apple.com/documentation/userexperience/Conceptual/AppleHIGuidelines/index.html" target="_blank">Apple Human Interface Guidelines</a> I think I have all the technical information I need.</p>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://simonpena.com/blog/proyectos/pennybank/some-unasked-explanations/' addthis:title='Some (unasked) explanations '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://simonpena.com/blog/proyectos/pennybank/some-unasked-explanations/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Introducing PennyBank</title>
		<link>http://simonpena.com/blog/proyectos/pennybank/introduction/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=introduction</link>
		<comments>http://simonpena.com/blog/proyectos/pennybank/introduction/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 05:16:24 +0000</pubDate>
		<dc:creator>Simón</dc:creator>
				<category><![CDATA[Pennybank]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Screenshot]]></category>

		<guid isPermaLink="false">http://pennybank.wordpress.com/?p=12</guid>
		<description><![CDATA[Pennybank is an Open Source personal accounting application, aimed to allow users to keep track of the most common financial operations: incomes, expenses and transfers, so it makes easier to keep your economy controlled. It is written in Java, and developed with a good Mac OS X integration in mind. An early screenshot can be [...]<div class="addthis_toolbox addthis_default_style " addthis:url='http://simonpena.com/blog/proyectos/pennybank/introduction/' addthis:title='Introducing PennyBank '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></description>
			<content:encoded><![CDATA[<p>Pennybank is an Open Source personal accounting application, aimed to allow users to keep track of the most common financial operations: incomes, expenses and transfers, so it makes easier to keep your economy controlled.</p>
<p>It is written in Java, and developed with a good Mac OS X integration in mind.</p>
<p style="text-align:left;">An early screenshot can be seen at the <a title="PennyBank Gallery" href="http://picasaweb.google.com/bulfaiter/PennyBank?authkey=YovOE1vgvkM&amp;feat=directlink" target="_blank">PennyBank</a> picasa gallery.</p>
<div id="attachment_17" class="wp-caption aligncenter" style="width: 310px"><a href="http://picasaweb.google.com/lh/photo/vC7spkZbPJ2tALu_9G6Mrg?authkey=YovOE1vgvkM&amp;feat=directlink"><img class="size-medium wp-image-17" title="mainWindow" src="http://pennybank.files.wordpress.com/2009/02/pennybank.png?w=300" alt="Application Main Window" width="300" height="176" /></a><p class="wp-caption-text">Application Main Window</p></div>
<div class="addthis_toolbox addthis_default_style " addthis:url='http://simonpena.com/blog/proyectos/pennybank/introduction/' addthis:title='Introducing PennyBank '  ><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_button_google_plusone" g:plusone:size="medium"></a><a class="addthis_counter addthis_pill_style"></a></div>]]></content:encoded>
			<wfw:commentRss>http://simonpena.com/blog/proyectos/pennybank/introduction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

