views:

81

answers:

3

I have written a Java Desktop Application that runs in Windows, Mac OS X, Ubuntu and Open Suse. I am having issues with is positioning thing differently in Linux.

I developed the application with NetBeans using the designer, it looks as I would expect in Windows and Mac OS X, but in the Linux distros certain label controls have shifted into different positions.

Is there a common reason for this?

+1  A: 

Perhaps Linux uses a different font. One where letters have a different width.

You could try to explicitely set a specific font for your Look&Feel. It should be a font which is installed on all of your target platforms.

Witek
I don't think it is this, the labels dont have text in them, they are being used as containers for images. Also the position change is quite substantial.
Dan
A: 

I'm assuming you developed the thing on Windows or Mac, that's why it looks "as expected". Can you compiling/running the code in your IDE on Linux and see how it looks?

My guess is that one of the implementations of the containers is flawed. I saw this sometimes when I did cross-development and mostly did trial-and-error modifications to fix it (by changing to use other classes). It also helped to have one developer working in Windows and another in Linux, so that we would easily spot and fix problem areas.

Amber Shah
A: 

I changed the Layout style from 'Free Design' to 'Absolute'

Dan