• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Double JList for Selection Panel with editable fields

 
Jillian Kay
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not entirely sure how to describe this, but the widget should allow users to set up how they want a table to look. There is a list of available columns, and they have to choose which are visible, and of those that are visible they set how wide the column is, and a number indicating sort order.

Sooooo....

I have been tasked to create two JList boxes, one for NOT visible columns and one for visible columsn. In between would be the "<<" "<" >" >>" buttons you often see that allow you to move the items back and forth from one list to another.

In the "visible" JList, each item should ALSO have editable fields for entering the width & sort order. The not-visible JList should not show those fields.

My questions are:
1. What do you call that thing when there are two JLists & the "<<" ">>" buttons in between? That might make my search easier...

2. Can I do this with JLists...or do I need to try to implement this with two tiny tables? (And just make it look like JLists)

Any suggestions on where to start??? See silly image I made in Paint below:

THANK YOU!!!
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here's something *really* rough (quick'n'dirty), but it might give you something to play with

only coded moving from left to right, other way is just removing the panel
component, and adding the title back to the left side.
Buttons moveUp and moveDown self-explanatory.

 
Jillian Kay
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks

I'll have to look into this solution later this week (i've now been dragged into figuring out drag and drop for JTable rows) but I wanted to say thanks before i forgot!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic