Dimension e = minSize(editor); Dimension n = minSize(next); Dimension p = minSize(previous);
Dimension e = prefSize(editor); Dimension n = prefSize(next); Dimension p = prefSize(previous);
    public void layoutContainer(Container parent)    {      synchronized (parent.getTreeLock())        {	  Insets i = parent.getInsets();	  boolean l2r = parent.getComponentOrientation().isLeftToRight();	  /*	    --------------    --------------	    |        | n |    | n |        |	    |   e    | - | or | - |   e    |	    |        | p |    | p |        |	    --------------    --------------	  */	  Dimension e = minSize(editor);	  Dimension n = minSize(next);	  Dimension p = minSize(previous);	  Dimension s = spinner.getPreferredSize();	  int x = l2r ? i.left : i.right;	  int y = i.top;	  int w = Math.max(p.width, n.width);	  int h = Math.max(p.height, n.height);	  h = Math.max(h, e.height / 2);	  int e_width = s.width - w;	  if (l2r)	    {	      setBounds(editor, x, y + (s.height - e.height) / 2, e_width,	                e.height);	      x += e_width;	      setBounds(next, x, y, w, h);	      y += h;	      setBounds(previous, x, y, w, h);	    }	  else	    {	      setBounds(next, x, y + (s.height - e.height) / 2, w, h);	      y += h;	      setBounds(previous, x, y, w, h);	      x += w;	      y -= h;	      setBounds(editor, x, y, e_width, e.height);	    }        }    }