如何在java gwt中绘制一条水平线,类似于HTML中的"<hr>"标签?我试过用它
com.google.gwt.user.client.Element bottomLine = DOM.createDiv();
Run Code Online (Sandbox Code Playgroud)
但这在某种程度上不适用于IE ...
Ath*_*ras 14
您可以使用HTML小部件在页面中添加所需的html
HTML html = new HTML("<hr style=\"width:100%;\" />")
rootPanel.add(html); // or add it inside another widget
Run Code Online (Sandbox Code Playgroud)
或者您可以在Panel上使用css并定义border-bottom属性(如果您有一个跨越整个页面的面板).