Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Code example: 2 lists interacting  RSS feed

 
Pete Mosca
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm looking for a Swing code example:
2 lists are side-by-side.
Between the 2 lists are 2 buttons, each with an arrow, one pointing left, and the other pointing right.
When the left-pointing button is clicked, the selected item from the right list is removed from the right list and added to the left list. The reverse happens when the right-pointing button is clicked.
This is a fairly common Swing set-up, so I'm assuming there are some good code examples out there on the Web. Can anyone help point me to them?
 
Jose Botella
Ranch Hand
Posts: 2120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch Pete.
For that task the section Adding items to and removing items from a List of the Java Tutorial would be helpful.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!