<?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>Waves &#187; netbeans</title>
	<atom:link href="http://www.aswinanand.com/category/netbeans/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.aswinanand.com</link>
	<description></description>
	<lastBuildDate>Thu, 29 Jul 2010 02:48:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
<cloud domain='www.aswinanand.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
		<item>
		<title>Good News!</title>
		<link>http://www.aswinanand.com/2007/01/good-news/</link>
		<comments>http://www.aswinanand.com/2007/01/good-news/#comments</comments>
		<pubDate>Fri, 19 Jan 2007 18:19:00 +0000</pubDate>
		<dc:creator>Aswin Anand</dc:creator>
				<category><![CDATA[Casually Speaking ...]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[netbeans]]></category>

		<guid isPermaLink="false">http://www.aswinanand.com/?p=123</guid>
		<description><![CDATA[Hi guys, just discovered that one of my blog posts is link #1 on a common Google search query regarding netbeans and S60 emulators. View the query results. Here&#8217;s the screen shot.]]></description>
			<content:encoded><![CDATA[<p>Hi guys, just discovered that one of my blog posts is link  #1 on a common Google search query regarding netbeans and S60 emulators.</p>
<p><a href="http://www.google.co.in/search?q=netbeans+s60+emulator">View the query results</a>. Here&#8217;s the screen shot.</p>
<p><a href="http://bp1.blogger.com/_Dl6UuK8jZZY/RbEF7Ru59OI/AAAAAAAAAAM/JLKfeMPalvI/s320/nbs60.JPG" title="View the screen shot"><br /><img src="http://bp1.blogger.com/_Dl6UuK8jZZY/RbEF7Ru59OI/AAAAAAAAAAM/JLKfeMPalvI/s320/nbs60.JPG" alt="" id="BLOGGER_PHOTO_ID_5021801575425373410" border="0" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.aswinanand.com/2007/01/good-news/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>On a cleaning spree, Other updates</title>
		<link>http://www.aswinanand.com/2006/12/on-a-cleaning-spree-other-updates/</link>
		<comments>http://www.aswinanand.com/2006/12/on-a-cleaning-spree-other-updates/#comments</comments>
		<pubDate>Sun, 17 Dec 2006 10:34:00 +0000</pubDate>
		<dc:creator>Aswin Anand</dc:creator>
				<category><![CDATA[Casually Speaking ...]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[netbeans]]></category>
		<category><![CDATA[proto]]></category>
		<category><![CDATA[sun tech days]]></category>

		<guid isPermaLink="false">http://www.aswinanand.com/?p=115</guid>
		<description><![CDATA[Hey guys, after quite a long time, assume about 3 years, I have cleaned my small room over this weekend&#8230; much to the surprise of my mom ofcourse . It took about 5 hours of day one and another 3 hours of day two to complete it in all glory. Next on line is my [...]]]></description>
			<content:encoded><![CDATA[<p>Hey guys, after quite a long time, assume about 3 years, I have cleaned my small room over this weekend&#8230; much to the surprise of my mom ofcourse <img src='http://www.aswinanand.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> . It took about 5 hours of day one and another 3 hours of day two to complete it in all glory. Next on line is my blog, which wasn&#8217;t touched except for doing new posts. Have to get a nice new template soon. Any suggestions?</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p><a href="http://java.sun.com/javase/6" target="_new">Java SE 6</a> is out. The whole <a href="http://www.java.net" target="_new">Java community</a> is gaga over it. <a href="http://www.netbeans.org" target="_new">Netbeans 5.5</a> now supports Java SE 6 also. <a href="http://www.techcrunch.com/2006/11/15/lack-of-internal-talks-at-microsoft-google" target="_new">Reading this</a> yesterday, I feel Sun is committed to <em>not</em> making that mistake. The next <a href="http://developers.sun.com/events/techdays/" target="_new">Sun Tech Days</a> event is happening at <a href="http://www.sercononline.com/suntechdays07/ms/home.htm" target="_new">Hyderabad</a> on 21-23 Feb 2007. The talks look promising and the topics they pick everytime are exciting. They have also added a Java ME day this time. If you are a java freek, DON&#8217;T miss this event. <a href="http://www.reg-express.com/suntech07/register.jsp?count=1" target="_new">Register</a>.</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p><a href="http://www.proto.in/" target="_new">Proto</a> has been going on great. The website now sports a new <strike>dress</strike> skin. If you are a startup company willing to showcase your product at Proto, nominate yourself. The nomination closes on 20th Dec 2006. Registration for other participants will be open soon. So, hang on! Read the <a href="http://www.proto.in/blog" target="_new">Proto blog</a> for more information.</p>
<p>Wow!! exciting times ahead.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aswinanand.com/2006/12/on-a-cleaning-spree-other-updates/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A Simple MIDP Application using Netbeans</title>
		<link>http://www.aswinanand.com/2006/05/a-simple-midp-application-using-netbeans/</link>
		<comments>http://www.aswinanand.com/2006/05/a-simple-midp-application-using-netbeans/#comments</comments>
		<pubDate>Mon, 01 May 2006 11:54:00 +0000</pubDate>
		<dc:creator>Aswin Anand</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[mobility]]></category>
		<category><![CDATA[netbeans]]></category>

		<guid isPermaLink="false">http://www.aswinanand.com/blog/2006/05/01/a-simple-midp-application-using-netbeans/</guid>
		<description><![CDATA[The last post was on setting up the Nokia S60 SDK with netbeans 5.0. The application we are going to develop now doesn&#8217;t require the Nokia SDK. It is required only when you want to implement Nokia specific features. By the way, MIDP is called Mobile Information Device Profile. Two common versions of MIDP supported [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://techlight.blogspot.com/2006/04/nokia-s60-emulator-integration-with.html">last post</a> was on setting up the <a href="http://www.forum.nokia.com/main/0,6566,034-483,00.html" target="_new">Nokia S60 SDK</a> with <a href="http://www.netbeans.info/downloads/download.php?type=5.0" target="_new">netbeans 5.0</a>. The application we are going to develop now doesn&#8217;t require the Nokia SDK. It is required only when you want to implement Nokia specific features. By the way, MIDP is called <span style="font-weight: bold; color: rgb(0, 0, 0);">M</span>obile <span style="font-weight: bold; color: rgb(0, 0, 0);">I</span>nformation <span style="font-weight: bold; color: rgb(0, 0, 0);">D</span>evice <span style="font-weight: bold; color: rgb(0, 0, 0);">P</span>rofile. Two common versions of MIDP supported by most mobile phones across manufacturers are MIDP 1.0 and MIDP 2.0. MIDP on combination with CLDC &#8211; <span style="font-weight: bold; color: rgb(0, 0, 0);">C</span>onnected <span style="font-weight: bold; color: rgb(0, 0, 0);">L</span>imited <span style="font-weight: bold; color: rgb(0, 0, 0);">D</span>evice <span style="font-weight: bold; color: rgb(0, 0, 0);">C</span>onfiguration &#8211; allows us to build <span style="font-weight: bold;">device independent</span> applications. Both of them are products from <a href="http://www.sun.com" target="_new">Sun Microsystems</a>. You can read more about <a href="http://java.sun.com/products/midp/" target="_new">MIDP here</a> and <a href="http://java.sun.com/products/cldc/" target="_new">CLDC here</a>. <a href="http://developers.sun.com/techtopics/mobility/device/device" target="_new">Look at the huge list of mobile phones that support MIDP and CLDC</a>.</p>
<p>For this application, we will use the standard emulator that ships with the netbeans mobility pack. We will create a simple application that accepts username and password. If the username is &#8220;aswin&#8221; <img src='http://www.aswinanand.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  then it will take you to the next screen. Otherwise, it will display a small error box. Understood??</p>
<p>Ok, be a good student and fire up Netbeans 5.0.</p>
<p><span style="color: rgb(255, 0, 0);">1.</span> Go to File&#8211;>New Project. Select &#8220;Mobile&#8221; on the left pane and &#8220;Mobile Application&#8221; on the right pane.<br /><span style="color: rgb(255, 0, 0);">2.</span> Click &#8220;Next&#8221; and give the project name as &#8220;MyGreatMobile&#8221;. Click &#8220;Next&#8221;.<br /><span style="color: rgb(255, 0, 0);">3.</span> Select the Emulator Platform as J2ME Wireless Toolkit 2.2. Leave the other settings as it is and select &#8220;Finish&#8221;.</p>
<p>You should have something similar to the one shown below.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/4378/1482/1600/1.0.jpg"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://photos1.blogger.com/blogger/4378/1482/320/1.0.jpg" alt="" border="0" /></a></p>
<p><span style="color: rgb(255, 0, 0);">4.</span> Choose Window&#8211;>Palette. The Palette window is now displayed. From the &#8220;Form Items&#8221; section, drag and drop 2 textfields on the &#8220;HelloForm&#8221;. The whole window should look like the one shown.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/4378/1482/1600/2.0.jpg"><img style="cursor: pointer;" src="http://photos1.blogger.com/blogger/4378/1482/320/2.0.jpg" alt="" border="0" /></a></p>
<p><span style="color: rgb(255, 0, 0);">5.</span> From the &#8220;Commands&#8221; section of the Palette, drag-n-drop and &#8220;Ok Command&#8221; and a &#8220;Exit Command&#8221;. Press F5 at anytime to view the output on the emulator.</p>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/4378/1482/1600/3.0.jpg"><img style="cursor: pointer;" src="http://photos1.blogger.com/blogger/4378/1482/320/3.0.jpg" alt="" border="0" /></a></p>
<p><span style="color: rgb(255, 0, 0);">6.</span> Drag-n-drop a &#8220;List&#8221; and an &#8220;Alert&#8221; from the &#8220;Screens&#8221; section of the Palette. Link the &#8220;Ok&#8221; of &#8220;helloForm&#8221; to &#8220;list1&#8243;. We will link the Alert programmatically. Also d-n-d a few listitems from the &#8220;Elements&#8221; section and a &#8220;Ok Command&#8221; onto &#8220;list1&#8243;. Link the &#8220;Ok&#8221; of list1 to Form1.  Check the screen shot below.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/4378/1482/1600/4.1.jpg"><img style="cursor: pointer;" src="http://photos1.blogger.com/blogger/4378/1482/320/4.1.jpg" alt="" border="0" /></a></p>
<p><span style="color: rgb(255, 0, 0);">7.</span> Double click on alert1 and change the text to &#8220;Invalid username or password&#8221;.<br /><span style="color: rgb(255, 0, 0);">8.</span> Now, if you switch to the Source view from the Flow Design view, you will be able to see that all the necessary code is generated, to implement the functionality shown in the flow design. THAT IS AMAZING!</p>
<p>Let us switch to Source view and do some tweaking to get the functionality we want. Find the function called <span style="font-weight: bold;">public void commandAction</span>. That function implements all the necessary conditions for navigation. It initially looks like below.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/4378/1482/1600/5.jpg"><img style="cursor: pointer;" src="http://photos1.blogger.com/blogger/4378/1482/320/5.jpg" alt="" border="0" /></a></p>
<p>Change the code so that it is similar to the next screen shot.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/4378/1482/1600/6.jpg"><img style="cursor: pointer;" src="http://photos1.blogger.com/blogger/4378/1482/320/6.jpg" alt="" border="0" /></a></p>
<p>We are done. Press F5 to view the beauty <img src='http://www.aswinanand.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> <br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/4378/1482/1600/7.jpg"><img style="cursor: pointer; width: 52px; height: 77px;" src="http://photos1.blogger.com/blogger/4378/1482/320/7.jpg" alt="" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/4378/1482/1600/8.jpg"><img style="cursor: pointer; width: 51px; height: 75px;" src="http://photos1.blogger.com/blogger/4378/1482/320/8.jpg" alt="" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/4378/1482/1600/9.jpg"><img style="cursor: pointer; width: 54px; height: 76px;" src="http://photos1.blogger.com/blogger/4378/1482/320/9.jpg" alt="" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/4378/1482/1600/10.jpg"><img style="cursor: pointer; width: 54px; height: 75px;" src="http://photos1.blogger.com/blogger/4378/1482/320/10.jpg" alt="" border="0" /></a><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/4378/1482/1600/11.jpg"><img style="cursor: pointer; width: 52px; height: 77px;" src="http://photos1.blogger.com/blogger/4378/1482/320/11.jpg" alt="" border="0" /></a></p>
<p>The next post will be on consuming .net web services on Java ME. Bye!!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aswinanand.com/2006/05/a-simple-midp-application-using-netbeans/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nokia S60 Emulator Integration with Netbeans 5.0</title>
		<link>http://www.aswinanand.com/2006/04/nokia-s60-emulator-integration-with-netbeans-50/</link>
		<comments>http://www.aswinanand.com/2006/04/nokia-s60-emulator-integration-with-netbeans-50/#comments</comments>
		<pubDate>Fri, 28 Apr 2006 04:00:00 +0000</pubDate>
		<dc:creator>Aswin Anand</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[mobility]]></category>
		<category><![CDATA[netbeans]]></category>

		<guid isPermaLink="false">http://www.aswinanand.com/blog/2006/04/27/nokia-s60-emulator-integration-with-netbeans-50/</guid>
		<description><![CDATA[Hello guys, I just downloaded the Nokia S60 SDK for developing MIDP based applications for java mobile phones. Netbeans proved its mettle here again in terms of recognising the SDK and freeing me of all troubles. I downloaded the S60 SDK here and netbeans 5.0 here. CarbideJ is not required if you are going to [...]]]></description>
			<content:encoded><![CDATA[<p>Hello guys, I just downloaded the Nokia S60 SDK for developing MIDP based applications for java mobile phones. Netbeans proved its mettle here again in terms of recognising the SDK and freeing me of all troubles. I downloaded the <a href="http://www.forum.nokia.com/main/0,6566,034-483,00.html" target="_new">S60 SDK here</a> and <a href="http://www.netbeans.info/downloads/download.php?type=5.0" target="_new">netbeans 5.0 here</a>. <a href="http://www.forum.nokia.com/main/0,6566,1_84,00.html" target="_new">CarbideJ</a> is not required if you are going to develop on top of netbeans.</p>
<p>That said, i will tell you how to integrate the S60 SDK into netbeans.<br /><span style="color: rgb(255, 0, 0);">1.</span> Goto Tools&#8211;>Platform Manager and click on the &#8220;Add Platform&#8221; button.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/4378/1482/1600/1.jpg"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://photos1.blogger.com/blogger/4378/1482/320/1.jpg" alt="" border="0" /></a></p>
<p><span style="color: rgb(255, 0, 0);">2.</span> Select &#8220;Java Micro Edition Platform Emulator&#8221; in the new dialog box and click on &#8220;Next&#8221;.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/4378/1482/1600/2.jpg"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://photos1.blogger.com/blogger/4378/1482/320/2.jpg" alt="" border="0" /></a></p>
<p><span style="color: rgb(255, 0, 0);">3.</span> If the IDE is unable to locate the S60 platform folders, click on &#8220;Find More Java ME Platform Folders&#8230;&#8221; button and point it to the location where you have installed the SDK.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/4378/1482/1600/3.jpg"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://photos1.blogger.com/blogger/4378/1482/320/3.jpg" alt="" border="0" /></a></p>
<p><span style="color: rgb(255, 0, 0);">4.</span> Click on Next. It will detect the installed platforms. Click on Finish and we are done. Close the Java Platform Manager.</p>
<p>Now, go to File&#8211;>New Project. Select &#8220;Mobile&#8221; on the left pane and &#8220;Mobile Application&#8221; on the right pane. Give it a name. On the next screen click on the &#8220;Emulator Platform&#8221; combo box and you will be able to see the installed emulators.<br /><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/4378/1482/1600/4.jpg"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://photos1.blogger.com/blogger/4378/1482/320/4.jpg" alt="" border="0" /></a></p>
<p>Thats it! we are done. You are up and ready to build beautiful applications for MIDP phones in just 4 steps <img src='http://www.aswinanand.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.aswinanand.com/2006/04/nokia-s60-emulator-integration-with-netbeans-50/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mustang (Java SE 6.0)</title>
		<link>http://www.aswinanand.com/2006/03/mustang-java-se-60/</link>
		<comments>http://www.aswinanand.com/2006/03/mustang-java-se-60/#comments</comments>
		<pubDate>Fri, 10 Mar 2006 20:28:00 +0000</pubDate>
		<dc:creator>Aswin Anand</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[netbeans]]></category>

		<guid isPermaLink="false">http://www.aswinanand.com/blog/2006/03/10/mustang-java-se-60/</guid>
		<description><![CDATA[Hi!!, just downloaded mustang beta. Have to try it. You can also download it here. There are a lot of cool features introduced with this. Read more about it here. It says there are improvements in UI too; and during the Sun Tech Days, they told that support was being added for Vista UI too. [...]]]></description>
			<content:encoded><![CDATA[<p>Hi!!, just downloaded mustang beta. Have to try it. You can also <a href="http://java.sun.com/javase/6/download.jsp" target="_new">download it here</a>. There are a lot of <a href="http://java.sun.com/javase/6/" target="_new">cool features</a> introduced with this. Read more about it <a href="http://www.devx.com/Java/Article/30722/1954?pf=true" target="_new">here</a>.</p>
<p>It says there are improvements in UI too; and during the Sun Tech Days, they told that support was being added for Vista UI too. Let us see how the UI displays in Vista. Will post more about the UI later in the day. By the way, i have uploaded some vista pictures from my very own installation of <a href="http://www.microsoft.com/windowsvista/" target="_new">Windows Vista</a> <img src='http://www.aswinanand.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> . <a href="http://esnips.com/web/vistapics" target="_new">See them</a>.</p>
<p>Bye!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aswinanand.com/2006/03/mustang-java-se-60/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Two Minute Web Browser in Java</title>
		<link>http://www.aswinanand.com/2006/03/two-minute-web-browser-in-java/</link>
		<comments>http://www.aswinanand.com/2006/03/two-minute-web-browser-in-java/#comments</comments>
		<pubDate>Tue, 07 Mar 2006 13:38:00 +0000</pubDate>
		<dc:creator>Aswin Anand</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[netbeans]]></category>

		<guid isPermaLink="false">http://www.aswinanand.com/blog/2006/03/07/two-minute-web-browser-in-java/</guid>
		<description><![CDATA[Hi! people, i have been hearing that a web browser in VB.NET takes 6 lines of code. How much lines of code do you think it would be in java?? Well, it takes just 3 lines of code. If you come back to me saying that it takes lot of pain to create the necessary [...]]]></description>
			<content:encoded><![CDATA[<p>Hi! people, i have been hearing that a web browser in VB.NET takes 6 lines of code. How much lines of code do you think it would be in java??</p>
<p>Well, it takes just 3 lines of code. If you come back to me saying that it takes lot of pain to create the necessary GUI then &#8220;WTF, download netbeans&#8221;. With matisse, netbeans provides a solid  foundation for designing GUIs, so that developers like me can forget GridBagLayout and rest in peace. Ok enough of that <img src='http://www.aswinanand.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><span style="color: rgb(255, 0, 0);">1.</span> Open netbeans ide.<br /><span style="color: rgb(255, 0, 0);">2.</span> Create a new project. File->New Project. Select &#8220;General&#8221; and on the right pane, choose &#8220;Java Application&#8221;.<br /><span style="color: rgb(255, 0, 0);">3.</span> Click next. Give the project name as &#8220;TwoMinBrowser&#8221; and &#8220;Finish&#8221;.</p>
<p>Your project is ready. Go to <a href="http://www.java.net/" target="_new">java.net</a> and <a href="http://jdic.dev.java.net/" target="_new">download JDIC</a> (<span style="color: rgb(204, 0, 0);">JD</span>esktop <span style="color: rgb(204, 0, 0);">I</span>ntegration <span style="color: rgb(204, 0, 0);">C</span>omponents). It doesn&#8217;t come as a part of Java SE 5.0 or J2SE 4.0. Good news is that, it is a part of <a href="https://mustang.dev.java.net/" target="_new">Mustang (Java SE 6)</a>. Unpack the JDIC zip file and you will find a &#8220;jdic.jar&#8221;.</p>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/4378/1482/1600/nb1.jpg"><img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://photos1.blogger.com/blogger/4378/1482/320/nb1.jpg" alt="" border="0" /></a><br />Click on the Projects tab in the IDE (Window->Projects), expand TwoMinBrowser. Now expand &#8220;Libraries&#8221; section, right click on it and select &#8220;Add JAR/Folder&#8221;. Navigate to the &#8220;jdic.jar&#8221; and add it. The projects tab should be like the image on the left.</p>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/4378/1482/1600/nb2.jpg"><img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer; width: 236px; height: 139px;" src="http://photos1.blogger.com/blogger/4378/1482/320/nb2.jpg" alt="" border="0" /></a><br />Expand &#8220;Source Packages&#8221;, right click on &#8220;twominbrowser&#8221; and select &#8220;New->JFrame Form&#8221;. Give it a name and click &#8220;Finish&#8221;. From the Palette, drag n drop a JPanel. Resize it to fit the full form. Now add a JTextField (txtUrl), a JButton and JTabbedPane (browPane). The final form should be like the screenshot on the right. Click on the image to see a bigger one.</p>
<p>Double click on the JButton (&#8220;Go&#8221;) or right click on it and select Events->Action->actionPerformed. Write the following code. Press Alt+Shift+F to resolve unresolved classes. Press F5. Should you get any errors, delete the Main.java from the &#8220;Source Packages&#8221; node and press F5 again. It should now compile and execute.</p>
<p><span style="font-family:courier new;">       try</span><br /><span style="font-family:courier new;">       {</span><br /><span style="color: rgb(255, 102, 0);font-family:courier new;" >       WebBrowser wb=new WebBrowser();</span><br /><span style="color: rgb(255, 102, 0);font-family:courier new;" >       wb.setURL(new URL(txtUrl.getText()));</span><br /><span style="color: rgb(255, 102, 0);font-family:courier new;" >       browPane.add(wb);</span><br /><span style="font-family:courier new;">       }</span><br /><span style="font-family:courier new;">       catch(Exception ex)</span><br /><span style="font-family:courier new;">       {</span><br /><span style="font-family:courier new;">       JOptionPane.showMessageDialog(null,ex.getMessage());</span><br /><span style="font-family:courier new;">       }</span></p>
<p>Type in a proper url at the textbox and click on &#8220;Go&#8221;. Our TwoMinBrowser will work. This is the result of display of yahoo page in our browser. The same code will work in linux also.</p>
<p><a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.blogger.com/blogger/4378/1482/1600/nb3.jpg"><img style="cursor: pointer;" src="http://photos1.blogger.com/blogger/4378/1482/320/nb3.jpg" alt="" border="0" /></a></p>
<p>Change the url and click on &#8220;Go&#8221; again, you should see a new tab. Thats it, ur tabbed browser is up and running in just 3 lines of code. If you are a netbeans user already, building this will take you only 2 minutes.</p>
<p>As i&#8217;m writing this, <a href="http://www.netbeans.info/downloads/download.php?type=5.5" target="_new">Netbeans 5.5 preview release</a> is installing. It requires <a href="http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&#038;PartDetailId=jdk-1.5.0_06-oth-JPR&amp;SiteId=JSC&#038;TransactionId=noreg" target="_new">JDK 1.5.0_06</a>. In case you don&#8217;t have, <a href="http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&amp;PartDetailId=jdk-1.5.0_06-oth-JPR&#038;SiteId=JSC&amp;TransactionId=noreg">download it here</a>. Read about the UML features of Netbeans 5.5 <a href="http://blogs.sun.com/roller/page/geertjan?entry=uml_and_netbeans_ide" target="_new">here</a> and <a href="http://blogs.sun.com/roller/page/geertjan?entry=uml_and_netbeans_ide_part" target="_new">here</a>.</p>
<p>Bye!</p>
<p><span style="font-weight: bold;">Update:</span> Geertjan has a <a href="http://blogs.sun.com/geertjan/entry/jdic_browser" target="_new">cool post</a> on porting this simple application to netbeans platform.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.aswinanand.com/2006/03/two-minute-web-browser-in-java/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
