It’s pretty simple. Some key points to note as follow:
1) Quite often, you find your change to the .css file doesn’t take effect. The key question here, are you changing the right .css file? I find several .css files in my project. One of them is in war/css/aa.css, another is in ./css/aa.css.
2) Add these definitions in the aa.css.
.column-disabled {
}
.column-selectable {
border:1px solid;
}
.column-1stSeletable {
border:1px solid;
background-color:#9c1fee;
}
3) If your source code, use like this:
approvalLevelCheckBox.setStyleName("column-1stSeletable");
4) GWT also supplies some other related methods
addStyleName(“”);
setStyleName(“”);
removeStyleName(“”);
setStylePrimaryName(“”);
addStyleDependentName(“”);
removeStyleDependentName(“”);
And the above code equals to
approvalLevelCheckBox.setStylePrimaryName ("column");
approvalLevelCheckBox. addStyleDependentName ("1stSeletable");