Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/327.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/90.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java GWT文本框添加按钮_Java_Html_Css_Gwt - Fatal编程技术网

Java GWT文本框添加按钮

Java GWT文本框添加按钮,java,html,css,gwt,Java,Html,Css,Gwt,我有一个文本框,我试图在文本框中找到一个按钮。 我知道这对GWT来说有点棘手 我有一个水平面板,在其中添加文本框 HorizontalPanel bar = new HorizontalPanel(); bar.addStyleName("indexBar"); bar.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM); bar.add(new Label("Select Accounts")); bar.add(accounts);

我有一个文本框,我试图在文本框中找到一个按钮。 我知道这对GWT来说有点棘手

我有一个水平面板,在其中添加文本框

HorizontalPanel bar = new HorizontalPanel();
bar.addStyleName("indexBar");
bar.setVerticalAlignment(HasVerticalAlignment.ALIGN_BOTTOM);
bar.add(new Label("Select Accounts"));
bar.add(accounts);
Label fname = new Label("Search First Name");
fname.setStyleName("firstNameLabel");


firstNameSearch = new TextBox();
bar.add(fname);
bar.add(firstNameSearch);
我已经看到可以使用html/css来实现这一点,但我无法用GWT来实现这一点


谢谢

这可以通过包装完成-尝试使用文本框的静态包装方法-

//method - static 
TextBox.wrap(Element element)
// "Creates a TextBox widget that wraps an existing <input type='text'> element."
//方法-静态
TextBox.wrap(元素)
//“创建包装现有元素的TextBox小部件。”

这可以通过包装完成-尝试使用文本框的静态包装方法-

//method - static 
TextBox.wrap(Element element)
// "Creates a TextBox widget that wraps an existing <input type='text'> element."
//方法-静态
TextBox.wrap(元素)
//“创建包装现有元素的TextBox小部件。”