cssgwtcssresource

How to Inject external css style sheet into GWT Panel widget?


How to inject CSS style sheet into one of my Vertical Panels in GWT ?

I have the following code

MainPanelResources.java

public interface MainPanelResources extends ClientBundle {

public interface MyMainPanelResourcesCss extends CssResource{
     public static final MainPanelResources INSTANCE = GWT.create(MainPanelResources.class);


 @Source("MainPanel.css")
 public CssResource css();
 }
}

MainPanel.css

@external .mainPanel {
    border: 1px solid black; 
}

Solution

  • Found the answer in Google Web Toolkit group, in Basic CSS question posted by Mike Dee https://groups.google.com/forum/#!msg/google-web-toolkit/TaQNg9Koemk/YI9btAZnaMIJ