Custom Component set Width or Height issue

Hi,
I have created a CustomComponent class, it is working very well. At least, until I try and set the width or height from outside the class, I’ve overrriden the setWidth & Height methods, here is an example of my “setWidth” method:


   @Override
   public void setWidth(String width)
      {
      super.setWidth(width) ;

      if (null != panel)
         panel.setWidth(width) ;
      
      requestRepaint () ;
      }

The panel object is valid since it is declared:
private FancyPanel panel = new FancyPanel () ;

The “panel” object is in this case a FancyPanel from the FancyLayouts addon, which inherits from panel. Within the panel are couple layouts: a vertical layout containing a horizontal layouts with buttons and a table. So the contents of “panel” are very simple. Table is set to immediate.

When I set the width or the height, as follows:

...
comp.setWidth("100%") ;
comp.setHeight("60px");
...

The space for the component is correct in my containing page, but nothing is visible. Whereas if I don’t explicitly call the setWidth or setHeight the component displays fine.

I’ve tried setting panel Immediate and tried it without, either way same result: blank screen.

I’m sure I’m making a basic mistake, but I can’t figure out what it might be. The only thing that occurs to me is do I need to set all layouts immediate=true?
Regards,
Anthony

I found the issue was an “intermediate” Vertical Layout within the panel. By setting the Expand Ratio, for the two components, the problem was fixed.

I must admit, even after close to a year working with Vaadin, I find the layouts confusing. Hopefully, Vaadin 7 will improve in this area.