Hi,

Using: NetBeans IDE 6.8 on Linux/Ubuntu
Note: V. 6.8 is the current release version for the Ubuntu package.

I'm writing a Java desktop app, when I run the application the initial size of the application's window is less than half the width of the main panel and less than half the height as well, as designed in the designer. The application consists of a jPanel (the main window) which contains 3 jPanels each of which contains various components, jTextFields, jComboBoxes, jLabels and jButtons.

It can be manually resized to the correct size but I can't get it to start at the correct size. I've tried changing the size with setSize and preferredSize to various values and the minimumSize as well, but no matter what sizes I enter the application is always the same initial size when I run it, less than half of what it should be in width and height.

How do I get the app to start at the exact size of main panel as I have designed it in the design editor?


Here is a screen cap of the size when the app starts:



Here is a screen cap of the size when it's been resized (manually) to the correct size:



Many thanks.