如何将Accordion添加到JPanel?

时间:2017-12-23 19:58:19

标签: java swing javafx

我有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) 我怎么能这样做?

0 个答案:

没有答案