Mittwoch, 30. Dezember 2009

Android programming is fun!

It's been a long time since my last post. Much happend and I had few time to post some stuff. But new fun is on the horizon. We have ordered some Android phones (HTC Magic) and I started to develop a new application to proof the concept of heterogeneous programming languages and devices in one system.

The target is to program the 8-Puzzle game ( as an Android app and connect it through SQLSpaces ( to Prolog agents, that will analyse the moves and provide feedback.

I already started with the UI and postet some screenshots on flickR:

Next year (I could also say next weekend) I will continue on the connection to SQLSpaces and some game logic...

Freitag, 24. Juli 2009

Update: Create an image of an invisible Swing component

In a recent post I have described the way how to print a invisible (better say, not yet added) component. It seams that we were not the only ones with this problem. Here is a second solution (in German, but code still in Java):

Montag, 29. Juni 2009

NetBeans 6.7 is out - without JavaFX!

As already mentioned in my last post, the new release of NetBeans was scheduled for end of June. And today, as June is quite at its end, NetBeans 6.7 is out. The new outstanding features are the tight integration with Kenai and the integration of a new build system, namely maven! These two features really rock! You can connect your Kenai project, access the issue tracker directly from NetBeans as well as check out the source and more! With the integration of maven, the main build system based on ant has a tough competitor. A new view has been integrated to visualize the dependencies of modules, which helps a lot if you have many.

There is one very big issue for me about the latest NetBeans release: JavaFX support is missing! Again: JavaFX support is missing! How could they do that? JavaFX was the main reason to use NetBeans! Now I have also used the new Kenai feature with the last milestones. I wanted to switch immediately to the new release, but without JavaFX support I still have to stick with the predecessor 6.5.1. We'll see when the support will be out!

Overall, as I said, good times in the Java eco system :D

Dienstag, 23. Juni 2009

Galileo is approaching

Few hours left until Galileo is finally released. Plan for tomorrow afternoon: Download, install, install plugins, migrate workspaces, have fun :D

All in all a very nice month for Java developers. Tomorrow Eclipse 3.5, later this month Netbeans 6.7 (see their roadmap). I just want to get good JavaFX support, either for Eclipse or for Netbeans. Currently Netbeans has better support for JavaFX, but still not as good as for "pure" Java. We'll see what the future will bring...

Sonntag, 21. Juni 2009

iPhone finally jailbroken

The Dev-Team has finally released the Pwanage Tool for OS 3.0 (and meanwhile even a second tool called redsn0w) to jailbreak updated devices. First I had some problems with error 1600 and 1604, but after some search I have finally solved them and everything is fine! An iPhone without Winterboard just sucks.

One thing I really hate about the new update is that the "old" iPhone (2G or Classic) does not provide all the new cool features that were announced for this release. No MMS, no Stereo Bluetooth profile, no tethering, and so forth. In the end you will get a voice recording tool and copy & paste. Wow! Thanks Apple!

Freitag, 19. Juni 2009

iPhone Classic @ OS 3.0

Still iPhone-Dev team has not release the new Pwanage Tool on their blog, but as always I could not wait so I was looking for any chance to update my (SIM-) unlocked phone before they will release the update. And as always there is a way, described here! The most important thing is that your iPhone has been unlocked using the Pwanage Tool, not QuickPwn! As I could not remember anymore I have just re-unlocked my iPhone with the Pwanage Tool and OS 2.2.1 and then updated to OS 3.0. And I can finally say, it works! One drawback now is that the phone is not jailbroken, not yet. I really have to admit that an original iPhone just sucks :D The whole look is so old school. Well, hopefully next days...

Simyo FTW

Ich hab es ja schon immer gesagt: Simyo FTW! Alle Anbieter denken darüber nach, wie viel sie für die Tethering-Funtkion the iPhones nehmen sollen und Simyo nimmt nichts! Tethering bei Simyo ist kostenlos! Es wird nur empfohlen die 1 GB "Flatrate" zu buchen! Ich sage es einfach noch einmal: Simyo FTW!

Nachzulesen im Simyo Blog!

Donnerstag, 18. Juni 2009

Create an image of an invisible Swing component

Yesterday we have tried to write an image of an invisible, better say, a component that has not yet been added to an already visible component on the screen. In other words, we have created an instance of a JPanel, added different stuff to it and wanted to create an PNG image out of it, without added the panel to the main application window. After several trials we have finally asked Google and found a nice solution (link):

public static BufferedImage
createImage(JComponent component, int imageType) {
Dimension componentSize = component.getPreferredSize();

BufferedImage img = GraphicsEnvironment
Graphics2D grap = img.createGraphics();
grap.fillRect(0, 0, img.getWidth(), img.getHeight());
return img;

You can now call this method like this:

BufferedImage image = createImage(p, BufferedImage.TYPE_INT_RGB);
ImageIO.write(image, "png", new File("/Users/giemza/Component.png"));

One thing that we have found out is that if you are working on a remote X11 connection the compatible image is a X11RemoteOffScreenImage. If you try to write this image with ImageIO under Java 1.5.0, the application will crash without any exceptions. Just no reaction. We could not reproduce this behaviour with Java 1.6.0.


The first question I have while starting the blog is: "Will anybody read it?" But after some time on twitter and some issues that I have found during my journeys through the internet, programming, gadgeting and so forth, I feel it is the time to share it with you! So maybe you will find something useful here, otherwise have a good day...