Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
SkinBase skin = (SkinBase) tabPane.getSkin(); TabPaneBehavior tabPaneBehavior = (TabPaneBehavior) skin.getBehavior(); tabPaneBehavior.selectNextTab();
Java 8 中没有这样的方法,我怎样才能获得行为?
你有没有尝试过:
TabPaneSkin skin = (TabPaneSkin) tabPane.getSkin(); //or BehaviorSkinBase skin = (BehaviorSkinBase) tabPane.getSkin(); TabPaneBehavior tabPaneBehavior = (TabPaneBehavior) skin.getBehavior(); tabPaneBehavior.selectNextTab();