SkinBase skin = (SkinBase) tabPane.getSkin();
TabPaneBehavior tabPaneBehavior = (TabPaneBehavior) skin.getBehavior();
tabPaneBehavior.selectNextTab();
Java 8中没有这样的方法,我怎样才能获得行为?
答案 0 :(得分:1)
你试过了吗?
TabPaneSkin skin = (TabPaneSkin) tabPane.getSkin();
//or BehaviorSkinBase skin = (BehaviorSkinBase) tabPane.getSkin();
TabPaneBehavior tabPaneBehavior = (TabPaneBehavior) skin.getBehavior();
tabPaneBehavior.selectNextTab();