Question

I'm trying to create a slide down (If that's the correct term) in Java. I can't seem to find a fitting Swing control to achieve this.

This is the effect I would try to reach. Layout

Like the menu of "Swing Containers" and "Swing menus" is visible, but the menu of "Swing Windows" is just a simple bar with a + sign.

Anyone an idea how I get this layout with the GUI editor of Netbeans?

Was it helpful?

Solution

From the posted example, you're looking for a collapsible component.

You could spend the time making your own, things to look out for are the layout manager that the component resides in, if it does not honour the preferred size of the components, it won't work (ie BorderLayout would not be a good choice to host this type of component in)

Personally, I use the JXCollapsiblePane from the SwingX libraries, normally in combination with a VerticalLayout from the same library.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top