mateusmaso
mateusmaso

Reputation: 8453

What is the name of this kind of Java/Swing interface?

Do you know what is the name of this layout for Java/Swing? Does the Java library already bring us this or should I do that on my own? If so, could any one of you show some samples?

alt text

Upvotes: 1

Views: 318

Answers (5)

user500074
user500074

Reputation:

Basically you have 3 JPanels: the first and third are the blank panes and the one in the middle contains two JButtons. GridBagLayout will be a good choice here.

You would want to add some ActionListeners to the two buttons in the middle to control the behaviour.

Upvotes: 0

Geoffrey Zheng
Geoffrey Zheng

Reputation: 6640

The commercial JIDE Grids has a DualList (scroll to page bottom for a screenshot).

Generally it's not easy to create a really solid Swing widget. You don't have to use custom UI for DualList, but it still takes a lot of work to get the MVC and UI (under all current LAFs) all working well.

Currently JIDE DualList doesn't support drag-n-drop between the lists, but they promised to add it soon (you can search their forum for DualList if you're a paying customer).

Upvotes: 1

AlexR
AlexR

Reputation: 115328

I think that GridBagLayout is what you are looking for.

Upvotes: 0

Amir Afghani
Amir Afghani

Reputation: 38531

Here's the sample code for a Dual JList. This is not a primitive Swing construct, but something you can build using Swing.

Upvotes: 2

oxbow_lakes
oxbow_lakes

Reputation: 134270

This is not provided by the Java swing library - you would have to roll your own or find a 3rd-party library.

Upvotes: 1

Related Questions