I have a glcanvas inside a jpanel with a BorderLayout. The size of the canvas should be dependent on the window size. The initial size is set via
glCanvas.setSize(640, 480);
And it is added to the panel like this
jPanel3DModel.add(Model3DCanvas.getInstance().getCanvas());
jPanelRight.add(jPanel3DModel, BorderLayout.NORTH);
However the size of the canvas is fixed and all the panels of the other components in my frame just resize.