This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center




已关闭8年。




如何将图像添加到GWT按钮,或如何使用镶嵌按钮添加图像。我不知道如何在我的代码中使用THIS示例。我需要添加什么库。我的项目中有马赛克库,可以使用它,但那里的示例对我不起作用。

谢谢

最佳答案

如果您只想将图像添加到普通的GWT按钮,则PushButton是可行的方法:

PushButton pushButton = new PushButton(new Image("test.png"));

10-07 19:35
查看更多