Thanks Man,

I have disabled all the special characters but i need to use only "%"
Character. i used the following code.

 ((TextBox)searchTable.getWidget(9,2)).addKeyboardListener(new
KeyboardListenerAdapter() {
                      public void onKeyPress(Widget sender, char keyCode, int
modifiers) {
                        if ((!Character.isLetter(keyCode))&& (!
Character.isDigit(keyCode))
                                        && (keyCode != (char) KEY_TAB)
                                        || (keyCode =='.')
                                        || (keyCode =='#')
                                        || (keyCode =='$')
                                        || (keyCode =='(')
                                        || (keyCode !='%')
                            && (keyCode != (char) KEY_BACKSPACE)
                            && (keyCode != (char) KEY_DELETE) && (keyCode != 
(char)
KEY_ENTER)
                            && (keyCode != (char) KEY_HOME) && (keyCode != 
(char)
KEY_END)
                            && (keyCode != (char) KEY_LEFT) && (keyCode != 
(char)
KEY_UP)
                            && (keyCode != (char) KEY_RIGHT) && (keyCode != 
(char)
KEY_DOWN)) {
                          // TextBox.cancelKey() suppresses the current keyboard
event.
                          ((TextBox)sender).cancelKey();
                        }
                      }
            });

Thank U.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to