Thursday, May 27, 2010

Moonrise over an Ayers Rock Sunset

Taken on Wednesday May 26th 2010 from the Sounds of Silence location.

Sunday, May 23, 2010

Google I/O 2010 - Keynotes

Google I/O 2010 finished two days ago. Lots of interesting news for HTML5 and Android. Here are the two Keynotes from Day 1 and Day 2.



Tuesday, May 18, 2010

Arduino Microcontroller Kits

Are you interested in embedded programming or microcontrollers? I have recently been looking into purchasing an Arduino Duemilanove to experiment with some physical computing. The Arduino is:
an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments.
 Using one of these kits from Little Bird Electronics or Toysdownunder it is possible to easily build systems that interact with their environment.

Little Bird Electronics
Arduino Inventors Kit
Arduino Starter Kit

Toysdownunder
Arduino Inventors Kit
Arduino Starter Kit
These kits include everything you need to start building with Arduino. They include the microcontroller board, sensors and wiring to connect it all together. The Inventors Kit also includes a printed book describing simple designs and the code to get you started.

My plan is to purchase one of these kits and do some building. Ultimately, I have some ideas for a large project that will use the Arduino along with some of the other sensors available.

Thursday, May 13, 2010

Using DJ NativeSwing in Netbeans

In my previous post I linked to a library that allows the use of native components within Java applications as easily as using Swing components. At the time of this post I had managed to get the Web Browser sample to compile and run in Netbeans 6.8 but was having troubles getting the HTML Editor to compile in Netbeans.

Over the last couple of days I have managed to get the HTML Editor compiled and running in Netbeans 6.8.

This post will demonstrate how to configure Netbeans to use the DJ NativeSwing library to embed a HTML Editor into a Java Swing Application.

The first step is to download a copy of the libraries required for DJ NativeSwing to function.

DJ NativeSwing
SWT - requires the M6 development build to function correctly.
FCKEditor- requires FCKEditor not the CKEditor Download
FCKEditor Java Plugin

Once you have downloaded all the class libraries unzip them to a handy directory. I use c:\java_util\ and create a separate directory for each class library.

The FCKEditor ZIP does not require unzipping. The FCKEditor java plugin takes care of this.

Open Netbeans and create a new Java Application and add the downloaded libraries to the project. Once completed the libraries tab should look like the image below.


Now that the project has been created you need to create the two class files the project requires. Rather than have masses of code in the post, I have included these class files for you to download.

HTMLEditor.java- this is the class that includes the main class. Refer to image below for this class. This was copied directly from the sample HTMLEditor code in the JavaWebstart sample on the DJ NativeSwing site.


SimpleHTMLEditorExample.java- this is the HTMLEditor class that extends JPanel and builds the HTML Editor control.

This class was slightly changed as it returned a compiler error in the state it was in on the DJ NativeSwing site.

In the screenshot below you can see where the call to create the new JHTMLEditor is returning an error. To make this code work correctly requires a change to specify what HTMLEditor implementation is to be used.

JHTMLEditor htmlEditor = new JHTMLEditor(JHTMLEditor.HTMLEditorImplementation.FCKEditor);


Once these minor changes have been completed, it should be possible to compile and run the project and get a HTML Editor with WYSIWYG editing.

I have included a zipped file of the Netbeans Project for people to try out.

Enjoy.

Tuesday, May 11, 2010

DJ NativeSwing Class Library

Would you like to include an embedded browser, media player, flash player or html editor in your application. Then the DJ NativeSwing class libraries may be what you are looking for. This is a JAVA library built on SWT to allow the use of native components in Java applications as easily as using the Swing component library.

I have been experimenting with this library and have managed to get the Web Browser and HTML Editor samples to compile and run in Netbeans 6.8.

Over the next couple of weeks I will be preparing some posts about how to configure the projects to be able to work in Netbeans.