// api
Panel panel2 = Y.newPanel((PanelConfig) PanelConfig.create().xy(10, 10).srcNode(parent.appendChild("<p></p>")).width("400px").render(true));
panel2.headerContent("<h1>Panel header string</h1>");
panel2.bodyContent(parent.appendChild("<p>Body <b>content</b> from an other node. Sl asdkljlksajd lfklaj serfjkjd slfj klajsdk fj klaj dsf. </p>"));
panel2.footerContent("<i>small</i>");
panel2.align(Align.create().node(parent).points(new Point[] { Point.create(0, 0), Point.create(0, 0) }));
panel2.render(); // apply the align
// now make this panel draggable by its header
panel2.plug(Y.Plugin().Drag(), DragConfig.create().handles(new String[] { ".yui3-widget-hd" }));