I’m trying to put a Panel and a GLCanvas in the same Frame beside each other using GridBagLayout. The two components starts out having the same size. But each time I resize the window, the GLCanvas changes size in the most bizarre way. Most often it increases in size at the expense of the Panel, but some times it decreases in size. I’ve tried to do a pack() on the Frame on resize, but the strange size-shifting behavior then effects the whole Frame, forcing it to not reshape to the chosen size. I’ve tried a normal GridLayout and then it works as supposed to (no size shifting).
The reason for wanting a Panel and GLCanvas in the same Frame is that I would like menu beside the scene where I can display properties belonging to objects in the scene. But the menu can only take up a small proportionate part of the Frame.
Does anyone know why the GLCanvas is acting so strange? Is there some internal size changing going on that a regular Canvas doesn’t do?