3DWindow in JPanel resizeable??

Hello everybody,

I tried to set a JPanel as a parent Container of a canvasPeer.

JPanel p = new JPanel();
CanvasPeer cp = rp.makeCanvas(p,100, 100, 32, false);

The JPanel is embedded in a complex containment-hierarchy and will get resized often. The Size of the JPanel is dependent to the size of its parent component. The Problem is, that the 3D-Window does not change its size. The same 3D-window embedded into a JFrame works perfectly when resized. So anybody knows how to connect the size of the parent component to the size of the CanvasPeer?

best regards

Marc

set BorderLayout as the Layout for the JPanel. It should work then.

jpanel.setLayout(new GridLayout(1, 1));

That’s what I’m doing… and it works !

Thanx a lot, that thing with the GridLayout helped me out.

Pleased to help you ;D

(post++)

(Note : this isn’t freepost. This is a polite answer…)