简体   繁体   English

如何在Java Swing中创建可折叠和扩展面板?

[英]how to create collapsible and expandable panel in Java Swing?

我需要在Java Swing中创建一个可折叠和可扩展的面板。.我无法在Netbeans 7.4的DESIGN PALETTE中找到它。.请帮助我

JavaFX has a JFXPanel class which allows you to embed JavaFX components in Swing. JavaFX具有JFXPanel类,该类允许您将JavaFX组件嵌入到Swing中。 Using that, you can embed the TitledPane and Accordion controls into your Swing application. 使用它,您可以将TitledPaneAccordion控件嵌入到Swing应用程序中。

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 有关如何使用这些JavaFX组件的教程,请参见: http : //docs.oracle.com/javafx/2/ui_controls/accordion-titledpane.htm
embedding of JavaFX nodes in Swing is here: How to add JFXPanel to already existing swing app 在此处将JavaFX节点嵌入到Swing中: 如何将JFXPanel添加到已经存在的Swing应用程序中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM