Monday, July 09, 2007

Presentations from Sun Tech Days

Today I want to point to this post from Charles Ditzel blog with a list of the available presentations of Sun Tech Days.

Thursday, July 05, 2007

Closing JPA EntityManger in web applications

I want to note this post from my neighborhood JavaNotepad.

When working with resources it's always important to ensure they are closed when not longer needed.
Working with JPA there are two kind of resources we can take care of: EntityManager and transactions.


Read...

Wednesday, July 04, 2007

Status line elements order, build number and other thips

Some time ago I read this interview to Emilian Bold
http://platform.netbeans.org/articles/nbm_interview_emilian.html

here you can learn some useful tips (like the build number version I was looking for).

Monday, July 02, 2007

Hiding tabs

Follow the Geertjan post:
http://blogs.sun.com/geertjan/entry/farewell_to_space_consuming_weird
you can know how to hide the tabs on your NB applications.

Hide close button

Here is a little tip about how to hide the close button in the tabs.
As you can read here the sentences are:

System.setProperty("netbeans.tab.close.button.enabled","false");
System.setProperty("nb.tabs.suppressCloseButton","true");


but I put it the 'restored()' method of my ModuleInstall class and it works fine.

Here you can find a more extensive list of options.

New methodologies

Here is a link to some new methodologies definitions. I think those are more closely to the reality than XP, AUP, RUP, TDD, etc.
In my case the last being applied is the ADD, I think it will be present for a long time :( because there are many Mr. A.

Wednesday, June 27, 2007

Enabling/Disabling Swing Containers

(From Alexander Potochkin's Blog)

The fact that disabling a Swing container doesn't mean disabling its child component has always been surprising for Swing beginners...

Read...

Be worry with PixelGrabber

Recently my friend Fran (that is working on an amazing project) talk me about the perils of PixelGrabber. I use it in my Balloon project and after looking up for a while I found this post:
PixelGrabber is too slow and has memory problems!

You can read some example using BufferedImage instead PixelGrabber and, at the end, an explanation post about the old 1.0 Java image API.

Wednesday, June 20, 2007

Managing volatility

(From developerWorlks)

The Java™ language contains two intrinsic synchronization mechanisms: synchronized blocks (and methods) and volatile variables. Both are provided for the purpose of rendering code thread-safe. Volatile variables are the weaker (but sometimes simpler or less expensive) of the two -- but also easier to use incorrectly. In this installment of Java theory and practice, Brian Goetz explores some patterns for using volatile variables correctly and offers some warnings about the limits of its applicability.

Read...

Thursday, June 07, 2007

Native libraries in NetBeans modules

The NB wiki and documentation says you can put your dll or so files in the 'lib' directory of your module, but I think a little example can be a more good explanation.

Supose you need a module wrapper for your new NB platform based application. Imagine you want to use the JAI API and distribute your application for Windows and Linux.
Right, after create the module wrapper (with the NB wizard) you'll can see a directory named (see the file view):

jai-wrapper\release\modules\ext

containing the JAR files, but what about the dll/so files?
The answer is put it in the:

jai-wrapper\release\modules\lib

See the previous links to the documentation if you have equal names for diferents SO's in your dll/so files.