View Full Version : Borderlayout (Ext GWT) & GWT

12 Feb 2010, 5:49 AM

I need help to create a simple Borderlayout.

My result looks like this:


Here you can find the ExtJS example: http://www.extjs.com/examples/#borderlayout (http://www.extjs.com/forum/../examples/#borderlayout)

My source code:

public void onModuleLoad() {

BorderLayout borderLayout = new BorderLayout(); // unused!

ContentPanel north = new ContentPanel();
ContentPanel west = new ContentPanel();
ContentPanel center = new ContentPanel();

north.add(new Label("North"));
west.add(new Label("West"));
center.add(new Label("Center"));

final BorderLayoutData northLayout = new BorderLayoutData(LayoutRegion.NORTH, 300);
final BorderLayoutData southLayout = new BorderLayoutData(LayoutRegion.SOUTH, 100);
final BorderLayoutData centerLayout = new BorderLayoutData(LayoutRegion.CENTER, 100);

ContentPanel mainPanel = new ContentPanel();
mainPanel.add(north, northLayout);
mainPanel.add(west, southLayout);
mainPanel.add(center, centerLayout);

// mainPanel.setLayout(borderLayout);

Whats wrong with my code?

Best rigards,

12 Feb 2010, 9:59 AM
What is wrong depends on how you want it to look(you dont say)...
One thing I notice is that you are using southlayout on something called west - is that what you meant to do?