Java Swing accordion in Nimbus look and feel

对着背影说爱祢 提交于 2020-01-02 06:51:30

问题


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?


回答1:


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.




回答2:


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



来源:https://stackoverflow.com/questions/10030002/java-swing-accordion-in-nimbus-look-and-feel

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