try with backgroundColor, also you don't need to use static methods

hp.getElement().getStyle().setBackgroundColor("red");

On Mon, Nov 28, 2011 at 12:44 AM, wahaha <il...@yahoo.com.cn> wrote:

> i write these code :
>
>
> -------------------------------------------------------------------------------------------------------------------------------------
>                HorizontalPanel hp=new HorizontalPanel();
>                Label lbl=new Label("aaaaa");
>                hp.add(lbl);
>                hp.setWidth("300px");
>                hp.setHeight("300px");
>                DOM.setStyleAttribute(hp.getElement(), "backgroun-color",
> "red");
>                DOM.setStyleAttribute(hp.getElement(), "border", "1px solid
> red");
>                RootPanel.get().add(hp);
>
> -------------------------------------------------------------------------------------------------------------------------------------
>
> then it wongs,the developement mod console said :
> java.lang.AssertionError: The style name 'background-color' should be
> in camelCase format
>
> --
> 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.
>
>


-- 
Guit: Elegant, beautiful, modular and *production ready* gwt applications.

http://code.google.com/p/guit/

-- 
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