how to create collapsible and expandable panel in Java Swing?

爱⌒轻易说出口 提交于 2019-12-01 10:42:51
Little Child

JavaFX has a JFXPanel class which allows you to embed JavaFX components in Swing. Using that, you can embed the TitledPane and Accordion controls into your Swing application.

Your end result will be like this:

This is exactly what you need, isn't it ? =)
This saves you a lot of coding work.

Tutorial on how to work with these JavaFX components is here: http://docs.oracle.com/javafx/2/ui_controls/accordion-titledpane.htm and
embedding of JavaFX nodes in Swing is here: How to add JFXPanel to already existing swing app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!