下面列出了怎么用javafx.scene.web.WebHistory.Entry的API类实例代码及写法,或者点击链接到github查看源代码。
public String getCurrentURL() {
//history = engine.getHistory();
ObservableList<WebHistory.Entry> entryList = history.getEntries();
int currentIndex = history.getCurrentIndex();
String txt = null;
if (currentIndex >=0 ) {
txt = entryList.get(currentIndex).getUrl();
}
return txt;
}