You imported com.google.gwt.dev.asm.Label instead of
com.google.gwt.user.client.ui.Label

Rahul wrote:
> Hi
> I am trying to create an composite widget that would have label and
> textbox wrapped in a verticalpanel
>
> here is my code for this:
> package com.example.test11.client;
>
> import com.google.gwt.dev.asm.Label;
> import com.google.gwt.user.client.ui.Composite;
> import com.google.gwt.user.client.ui.TextBox;
> import com.google.gwt.user.client.ui.VerticalPanel;
> import com.google.gwt.user.client.ui.Widget;
>
>
>
> public class Field extends Composite{
>
>       public Field (String header)
>       {
>               VerticalPanel widget = new VerticalPanel();
>
>               Label headerText = new Label(header);
>               widget.add(headerText);
>
>
>
>               TextBox t1 = new TextBox();
>               widget.add(t1);
>               initWidget(widget);
>
>       }
>
> }
>
> I am getting the following errors while defining labels.
> 1) the constructor label(string) is undefined
> 2)The method add(Widget) in the type VerticalPanel is not applicable
> for the arguments (Label)
>
> can anyone tell me where am i going wrong
> thanks a lot
>
> >
>
>   

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to