Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import com.google.gwt.user.client.ui.TextBox;
- import java.util.function.BiConsumer;
- public class TextBoxDialog extends OkCancelDialog<TextBox> { // see https://pastebin.com/e3ThyE40
- public TextBoxDialog(String title, String defaultValue, BiConsumer<TextBox, OkCancelDialog<TextBox>> onClick) {
- super(title, new TextBox(), onClick);
- widget.setText(defaultValue);
- }
- @Override
- public void show() {
- super.show();
- widget.selectAll();
- }
- }
Add Comment
Please, Sign In to add comment