View Full Version : Where to Start ?!

20 Jul 2009, 2:18 PM
The samples , examples in the download are HUGE, is there no where at all where I can find simple 'Here's how to start' example ?

I am copying the CenterLayout from the explorer, but it only centers horizontally, I have no idea why it doesn't do both and no Idea where to look for the answer.

Please anything for a beginner would really help.

20 Jul 2009, 2:21 PM
You should try to post your code you have already and somebody can help you about your centerlaoyut problem.

20 Jul 2009, 2:39 PM
The CenterLayout is taken directly from http://extjs.com/examples/explorer.html#centerlayout .

The module entry point is:

package com.test.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.dom.client.KeyCodes;
import com.google.gwt.event.dom.client.KeyUpEvent;
import com.google.gwt.event.dom.client.KeyUpHandler;
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.VerticalPanel;

public class Tester implements EntryPoint {

public void onModuleLoad() {
RootPanel.get().add(new CenterLayoutExample() );

The host page is the gwt example, with nothining in the body.

20 Jul 2009, 2:50 PM
public void onModuleLoad() {
Viewport v = new Viewport();
v.setLayout(new FitLayout());
v.add(new CenterLayoutExample());

20 Jul 2009, 2:53 PM
Thank you! I will look up ViewPort.