What is the proper method to Embed a Java Applet in an EXT-Gwt Container?
I'm using Sencha EXT-Gwt and trying to embed a Java Applet in a ContentPanel. I want the container to fill the whole screen (adding it to the rootpanel), and then i want the applet to be 100% width and height of the available space, minus whatever border, header, footer, etc I put in the Surrounding Ext widget.
When I try to do this intuitively, it results in the size of my applet overrunni开发者_开发知识库ng the bottom of the container (i.e, the applet ends up bigger than the available space. How do i get it to "stay" in it's available space?
ContentPanel cp = new ContentPanel();
cp.setHeading("Folder Contents");
cp.setHeaderVisible(false);
cp.setCollapsible(false);
cp.setFrame(false);
cp.setBottomComponent(toolBar);
RootPanel.get().add(cp);
cp.layout();
cp.add(widgetAppletOne);
cp.layout();
Thanks,
P
Turns out I had to use a FitLayout in a Viewport to achieve the full-browser window effect I wanted.
ContentPanel cp = new ContentPanel();
cp.setHeading("Folder Contents");
cp.setHeaderVisible(false);
cp.setCollapsible(false);
cp.setFrame(false);
cp.setBottomComponent(toolBar);
cp.add(widgetAppletOne);
cp.setLayout(new FitLayout());
Viewport v = new Viewport();
v.setLayout(new FitLayout());
v.add(cp);
RootPanel.get().add(v);
v.layout();
cp.layout();
精彩评论