A Label widget doesn't normally get focus. You can't tab to it. If you want to be able to tab to it, you can wrap it in a FocusPanel.
The FocusPanel also lets you capture mouse and keyboard events. The FocusPanel gets the focus, but the widget it wraps is what triggers the mouse events. Not that you'd normally notice because you would want to wrap it exactly.
FocusPanel panel = new FocusPanel();
panel.setSize("200px", "120px");
panel.addStyleName("demo-panel-borderless");
final Label label = new Label("Label");
label.setWidth("100px");
label.setStyleName("demo-label");
label.addMouseListener(new MouseListener()
{
public void onMouseDown(Widget sender, int x, int y)
{
}
public void onMouseEnter(Widget sender)
{
label.addStyleName("demo-label-over");
}
public void onMouseLeave(Widget sender)
{
label.removeStyleName("demo-label-over");
}
public void onMouseMove(Widget sender, int x, int y)
{
}
public void onMouseUp(Widget sender, int x, int y)
{
}
});
panel.add(label);
RootPanel.get("demo").add(panel);