Hi,
I am trying to create a dialog with dynamicly-sized panels which user would be able to extend/hide like the ones in various Properties dialogs in Netbeans.
I am using JPanel with GroupLayout as my container. Extendable panels are resizable horizontally, but vertically they are fixed size. As soon as the panel extend/hide button is pressed I do the following:
- hide or show the content pane of that group via setVisible();
- resize main JPanel accordingly (ie. add or subtract panel's content pane height);
The code for action handler;
This works, bit the flickering.. OMG. It is really bad. I have tried to override update, paint etc. I have even introduced a boolean variable to stop painting in every window, until the function returns, but it did not solve it. Any ideas?
Basically I want the window to be DEAD until I have shown/hidden necessary components and resized it.
[ October 04, 2007: Message edited by: Stepan Kolesnik ]