Posts RSS Comments RSS Del.icio.us Digg Technorati Blinklist Furl reddit 122 Posts and 30 Comments till now
This wordpress theme is downloaded from wordpress themes website.

Archive for the 'Java' Category

Cross Platform GUI toolkit choices

I know they aren’t the only choices, but here’s the ones I looked at.

My top 3 ideas are:
1) Qt, C++, Qt Creator (or Visual Studio / gcc / etc)
2) Swing, Java, Eclipse (or NetBeans, or IntelliJ)
3) SWT, Java, Eclipse (or NetBeans, or IntelliJ) (JFace rather than SWT?)

Some ideas that get honorable mention:
A) multiple native GUI toolkits (Windows, WPF, Expression Blend) (Mac OS X, Cocoa, Interface Builder) (GNOME, GTK+) (KDE, Qt)
B) REAL Studio (formerly REALBasic)
C) GTK#, C# and .NET, Mono

An absolute minimum is to have very correct native visual style for the widgets (Mac OS X – Cocoa Aqua ?) (Windows – not sure if it’s Windows Forms or WPF ?) (GNOME – GTK+ ?) (KDE – Qt ?).  Beyond that, it should do things like dialogs where the position of the (OK, Cancel) buttons is correct (for Windows 7, Mac OS X, GNOME, KDE), which I know Qt at least tries to do.  Probably a native app should use different defaults shortcuts for each OS.

I saw that Apple supports Swing, and that SWT has a native widget focus.  However, I don’t know how well they compare to Qt (especially on Mac OS X) for these things.

I may have ruled out REAL Studio too soon, but I’m not enthused about that path unless it’s really a lot better than the other choices (such as Qt, Swing, SWT).

My first cross-platform GUI desktop application is just a simple specialized object based image drawing utility (you can open a png image and draw objects on it, like rectangles or polygons, and resize / move / delete / copy etc these objects).

The places I got the most information on this were:
1) doc from Apple, Qt, etc (Qt had some good videos)
2) trying it out myself (and looking at screen shots)
3) the official mailing lists, such as qt-interest and mono-osx

At this point I’m leaning towards Qt.  More on that in my next post.

Java with NetBeans IDE, import library JAR

I used Java a lot in college…  But it’s been a while.  I’m trying out NetBeans IDE (for both Java and Python).  Here’s some notes from writing my Java application.

System.out.println(), System.out.print()

Add a .jar library:
1. Right-click the Libraries node and choose "Add JAR/Folder".
2. Browse to and select the .jar file(s).  It didn’t work when I added it as a folder, so i strongly recommend you add each .jar file separately.
javaNetBeans01[4]

3. Right-click the Libraries node and choose Properties
4. Choose the file you added (for each file), then Edit, then specify the Javadoc and Sources
javaNetBeans02[6]
5. In your java code, import the package.  The package names should be specified in the java doc.  In my example, this would be (import net.sf.sevenzipjbinding.*;) or (import net.sf.sevenzipjbinding.SevenZip;) etc.

Shift+F11 to build main project.  F6 to run main project.