Arrow pointing right to collapse, pointing to down to expand(Java Swing)
Answered
I'm developing a plugin. For the UI, I want to add an arrow and a title as follow. If we click the button, three fields below it will expand or collapse. Anyone knows which library in Java Swing can implement this? Thanks in advance!
Please sign in to leave a comment.
Try the CollapsibleTitledSeparator
Keep in mind that there's UI Inspector available to obtain existing implementations within the IDE on your own.
Hello Jakub, Jakub Chrzanowski
Thanks for answering this. Could provide the specific path of this class? Cannot find it in the plugin documentation. Thank you very much!
https://github.com/JetBrains/intellij-community/blob/16d0b6364c03634bd416b1df083c47fd042a4389/platform/platform-impl/src/com/intellij/ui/dsl/builder/impl/CollapsibleTitledSeparator.kt
Jakub Chrzanowski
Yes, it works partially. But when I click the Chevron arrow, it cannot expand/ collapse the three text field boxes under it. I create a panel and add these three text field boxes into this panel, then I add the panel into this CollapsibleTitledSeparator.
In addition, do you know how to import this library into my maven project. My compiler is Gradle. I think maybe it's not right to copy the code and create a class directly? Thanks.