I need to create a collapsible and expandable panel in Java Swing.. I am not able to find it in the DESIGN PALETTE of Netbeans 7.4 .. Kindly help me
Asked
Active
Viewed 9,852 times
2
-
1http://www.coderanch.com/t/341737/GUI/java/Expand-Collapse-Panels or http://just4everythings.blogspot.com/2013/06/swing-accordion-pane-or-swing.html – StanislavL Nov 25 '13 at 05:54
-
1Check http://eppleton.de/blog/?p=970 – Sandhu Santhakumar Nov 25 '13 at 06:00
-
2Take a look for SwingX JXCollapsiblePane – MadProgrammer Nov 25 '13 at 06:33
1 Answers
6
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

Community
- 1
- 1

An SO User
- 24,612
- 35
- 133
- 221