4

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

mKorbel
  • 109,525
  • 20
  • 134
  • 319
Tarik
  • 2,151
  • 4
  • 19
  • 26

2 Answers2

7

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.

Qwerky
  • 18,217
  • 6
  • 44
  • 80
3

A similar component is the JXTaskPane/-Container which is part of SwingX You can have a look at a demo inspired by SwingSet3.

Note that SwingX is actively maintained, its current release 1.6.3 available at maven.java.net

kleopatra
  • 51,061
  • 28
  • 99
  • 211
  • Thanks for the link. I was also comparing this to the JavaFX Accordion class. Both the JXTaskPane and the swingset3 CollapsiblePanel seem superior to me, at the moment, than the JavaFX Accordion because it, strangely, only allows one sub-component to be open at a time. – Enwired Jun 26 '12 at 19:50
  • @Enwired they are different components: an accordion (or outlook bar) is designed to show exactly one page, just as a tabbedPane. BTW (cough): the 1.6.3 release of SwingX has a show-stopper bug regarding JXCollapsible/JXTaskPane (http://java.net/jira/browse/SWINGX-1494). On the bright side: it is fixed in the svn version. – kleopatra Jun 27 '12 at 09:36