Of course it is possible. For example:

[code]
// create the button
Button btn = new Button("click me", new ClickListener(){
  public void onClick(Widget sender){
    Window.alert("you just click a button");
  }
};

// add the button to a panel
AbsolutePanel absolutePanel = new AbsolutePanel();
absolutePanel.add(btn);
[/code]

In fact almost all panels provide the "add" which allows you to append
widgets to that panel's DOM tree. You can also add elements directly
to the root panel (in most cases this is the <body>). For example:

[code]
// get an instance of the root panel
RootPanel myRoot = RootPanel.get();

// add to the rootpanel the button created in the example above
myRoot.add(btn);
[/code]

On Mar 24, 11:32 am, Gilles <[email protected]> wrote:
> I am coming for the actionScript world. I have some problems at
> runtime, to fix those problems I would need to at a widget at
> runtime.
> For example, I would like to add a button. Is it possible ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to