i've been doing some introduction to solidstate physics with using Java3D. After delving into many 3D things inside, decided to put some buttons to test different things. My problem emerged here.
In the below picture, i was using setLayout(null) to place buttons and Canvas3D:
What i did not want here is:
- Canvas3D overlaps buttons.
- Canvas3D does not stretch to keep same ratio of picture size / window size so when i resize window it just is in same size.
Then i tried using setLayout(new BorderLayout());
and add("Center",component);
for the Canvas3D while "South", "West", "East" for the buttons. Below picture is showing the case:
This looks better but this time another problem comes:
- Buttons are not the size i wanted(stretches to window) and is not at the offset position i wanted.
- Buttons also overlap eachother when i put two on the same area like "South".
Question: How can i make Canvas3D stretch to window while buttons are just in place i wanted (x,y) and has the size i wanted (h,w) without being overlapped by Canvas3D. I tried different layouts for Canvas3D and Buttons-->failed. Only one layout is showing.
Thank you for your time.
Java3D 1.5.2 and Eclipse . Windows XP and intel centrino