code: private Dimension getLayoutDimension()
      {
          Dimension dim;
          if (layoutDimension != null)
          {
              dim = new Dimension(layoutDimension);
              if (dim.width <= 0) dim.width = 10; //use some minimum size when the size is not known
              if (dim.height <= 0) dim.height = 10;
          }
          else
              dim = new Dimension(10, 10);
          return dim;
      }
docs: Obtains the dimension that should be used for the layout.
  @return the dimension