Getting rid of the grey empty area on your Netbeans Platform Application (RCP)

The short answer is that the gray area that you are seeing in lower bottom of the window is actually the editor area (aka document area) and you can hide it by adding run.args.extra=-J-Dnetbeans.winsys.hideEmptyDocArea=true to your platform.properties file. Or by calling System.setProperty("netbeans.winsys.hideEmptyDocArea", "true"); from one of your module’s Installers. That’s all you need to know but if you are interested on getting some details and references continue reading. If you create a new Netbeans RCP application and only add TopComponents to modes other than editor (modes which kind=“view”) then you will end up with an empty document area (could be at the bottom, top, left, right or in between TopComponents depending which modes you placed the TCs on). But first, you ask, how do I assign TopComponents to modes? Well you do that in the new Window wizard for example ...

July 3, 2010

JTable and JPA Pagination through custom TableModel

I really want to talk about JTable, Beans Binding and JPA pagination but I think I need to write about JTable and JPA pagination first. So I will take the Beans binding stuff in another post. By the way, choose wisely your JPA Provider/DB Provider combination, as some combinations will not give you any real paginations at all. For example, neither OpenJPA, Hibernate or TopLink/EclipseLink seems to support Apache Derby pagination (OFFSET/FETCH). The example here uses Derby and TopLink which is a bad example because the JPA pagination doesn’t get translated to SQL command for pagination. So if you really want proper pagination you should use other combination like Hibernate JPA/HSQLDB. ...

August 17, 2009

Disable splash screen on your Netbeans Application

Just add run.args.extra=--nosplash to the project.properties file

November 19, 2008

Facebook API

I’ve been playing a little with Facebook API and I run into problems when trying to use the facebook.feed.publishStoryToUser api call. That call always return 0 (permissions error) for me. I realized that there’s a difference between “Added applications” and “Authorized applications”. So if you just direct the user to the login page (http://www.facebook.com/login.php?api_key=YOUR_API_KEY&v=1.0) from you application your app will end up in the Authorized Applications side. You have to direct the users to your application page in facebook first (http://www.facebook.com/apps/application.php?id=xxxxxxxx&ref=s).

November 15, 2007

Two web applications sharing the same Derby database

I just realized that to be able to open/share the same Derby database from two different web applications running in the same Tomcat instance (same JVM) you’ll need to put derby.jar in the $TOMCAT_HOME/common/lib and remove it from your applications WEB-INF/lib. I got the clue from this RIFE web page the jarfiles you need are derby.jar and derbytools.jar . Due to classloader peculiarities, don’t copy them to your application’s web/WEB-INF/lib/ subdirectory, or to Tomcat’s shared/lib/ directory. Tomcat’s common/lib/ directory works, and probably common/endorsed/ does too. ...

October 15, 2007