Thursday, January 28, 2016

background image on panel in GWT

Hi all,

I am using Netbeans project,and I have attached image to correct my problem

my problem is in my project I have class extends FlowPanel, I want to add the Image as background on this class. The image from images folder 

I tried css as well as class itself. ie.
the css is
 
.desktopPanel{
    background-image: url("\cti\gwtdemo\client\images\intelview-bkground.jpg");
    background-color: lightgray;

}
 and in the class i have written

public class DesktopPanel extends FlowPanel {

    private final ClientMain cmain;
    Image image = new Image();

    public DesktopPanel(ClientMain cmain) {
        this.cmain = cmain;
        image.setWidth("100%");
        image.setHeight("100%");
        image.setStyleName("backgroundImg");
        image.setUrl("cti\\gwtdemo\\client\\images\\traffic-bkground.jpg");
        addStyleName("desktopPanel");
        // add(new Label("Desktop"));
    }

}

but I could not see the image in Panel. please go through the attached file and correct my problems 

Thanks in advance
Ramanan

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment