【发布时间】:2016-11-23 13:29:27
【问题描述】:
有谁知道如何解决我的问题。 我有一个带有 4 个标签的 TabSheet。我需要在上传文件时将用户重定向到第二个选项卡。我的代码:
//create tabsheet with 4 tabs
private void createTabs() {
TabSheet tabs = new TabSheet();
FirstTab firstTab = new FirstTab();
tabs.addTab(firstTab, "FirstTab");
SecondTab secondTab = new SecondTab();
tabs.addTab(secondTab, "SecondTab");
ThirdTab thirdTab = new ThirdTab();
tabs.addTab(thirdTab, "ThirdTab");
FourthTab fourthTab = new FourthTab();
tabs.addTab(fourthTab, "FourthTab");
vertLayout.addComponent(tabs);
}
//create upload button
private Button uploadButton() {
Button uploadFile = new Button("Upload");
UI.getCurrent().addWindow(new UploadFileWindow());
return uploadFile;
}
感谢支持!
【问题讨论】:
-
谢谢!确实,这是个好主意