Thanks for your help. I will try to solve or work around this issue with your suggestions in mind (or just change the design, avoiding too many nested components!). You have been very helpfull, thanks again.
Thank you for your fast reply.
Yes, I also thought of the fix you suggested but the trouble is that when I have a more complex structure, e.g. when I add nested tabs, I get this behavior every time I switch back and forth between tabs. For example, add a control to subview 1 (that is part of View 3) in stage 4 of your demo., i.e.
Then change the view in the upper tab (e.g. from view 3 to view 2). If you then switch back to view 3, the component is visible under subview 2 even though its parent is subview 1. This happens everytime you switch between the upper tabs. Strangely enough if I add a component with matlabs uitool, I do not get this behavior. Any suggestions?
And again, it is really an excellent piece of work.
Excelent piece of work, very impressive indeed.
I seem to have some issues with adding components with jcontrol to a GTabContainer though. To give a simple example: I run your waterloodemo until Stage3 and there, instead of adding a matlab figure to tab2, I try to add a JPanel to tab1, i.e. I substituted the code that says
then this control, on creation, shows up on top of tab2 instead of tab1. Its gets added to tab1 correctly but shows up on tab2 on addition. If I instead add a matlab control (e.g. using uicontrol) I do not get this behavior. This is a simple example just for illustration but it becomes an issue when trying to build a more complicated GUI with many nested tabs. Components created with jcontrol (or Yair Altmans uicomponent or by direct addition with javacomponent) seem to be stuck on top of some of the tabs while components created with MATLAB's uitools (e.g. uicontrol or uitable) does not excibit this behaviour. Any suggestions of what could be the problem?