我有3个JPanel,这3个也在JPanel中。当我点击按钮或类似TitledPane(我不确定Accordion和TitledPane之间有什么区别)样本时,我试图显示或隐藏这3个JPanels:
https://docs.oracle.com/javafx/2/ui_controls/img/accordion-sample1.png
但我注意到我不能将TitledPane或Accordion添加到带有panel.add(accordion)或panel.add(titledPanel)的JPanel中。 (假设该面板是JPanel) 我怎么能这样做?