m_tbPhone = new TextBox();
m_tbPhone.addKeyPressHandler(new KeyPressHandler()
{
@Override
public void onKeyPress(KeyPressEvent event)
{
char c = event.getCharCode();
if(!Character.isDigit(c) && !(event.getNativeEvent().getKeyCode() == KeyCodes.KEY_TAB))
((TextBox)event.getSource()).cancelKey();
}
});