I was doing an introduction to solid state physics using Java3D. After immersing myself in many 3D things inside, I decided to put some buttons to test different things. My problem arose here.
In the following figure, I used setLayout (null) to place the buttons and Canvas3D:

What I do not need here:
- The Canvas3D buttons overlap.
- Canvas3D does not stretch to maintain the same window size / size ratio, so when I resize the window, it just has the same size.
Then I tried to use setLayout(new BorderLayout()); and add("Center",component); for Canvas3D, and for the buttons - "South", "West", "East". The image below is shown:

This looks better, but this time there is another problem:
- The buttons do not fit the size (stretches to the window) and are not in the offset position that I wanted.
- The buttons also overlap when I put two in the same area as South.
Question: How to make Canvas3D stretch to the window while the buttons are in the place that I wanted (x, y) and had the size that I wanted (h, w) without overlapping Canvas3D. I tried different layouts for Canvas3D and Buttons -> failed. Only one layout is shown.
Thank you for your time.
Java3D 1.5.2 and Eclipse. Windows XP and Intel centrino
source share