Search code examples
javaswingnimbusexpandable

Java Swing accordion in Nimbus look and feel


While I was reading Oracle Swing documentation, I came across this example of a set of components displaying the Nimbus Look and Feel named SwingSet3. I'm new to Swing. Can someone tell me if the accordion in the sidebar is a Swing component or not?

SwingSet3


Solution

  • It is not a standard swing component.

    You can have a look at the source code for the SwingSet3 demo here. The component on the left is a composite component made out of various other components such as JPanel, JLabel and JButton. There is a custom com.sun.swingset3.utilities.CollapsiblePanel too.