My GWT page has a TextArea and I would like it to have the focus and to have all the text selected just when this page is loaded. I try the code below but it does not work at all. Can you help me? Thanks
final TextArea myText = new TextArea();
myText.setCharacterWidth(50);
myText.setVisibleLines(20);
myText.setText("Just try something");
RootPanel.get("textContainer").add(myText);
myText.setVisible(true);
myText.setFocus(true);
myText.selectAll();