[nbusers] Adjusting What the List Displays

  • From: "swifttarrow" < >
  • To:
  • Subject: [nbusers] Adjusting What the List Displays
  • Date: Wed, 27 Jun 2012 18:30:36 -0400

Hi all! My first post, be nice. :)

I am trying to create a JList of Participant Objects. These objects are 
stored in a TreeMap. I want to allow the user to be able to add participants.

Questions:
1. Does adding a newly instantiated Participant directly into the TreeMap 
sufficient to have the JList update the list of entries in sorted order (by 
String)?

2. If not, what additional steps do I need to do?
       a. For example, do I need to maintain the sorted-ness of the Jlist 
separately from my data structure (find insertion point, then insert)?

My plan was to have an "Add Participant" Button that would then have a 
ActionListener that then creates a Participant object, which I add to my 
TreeMap.

All comments/suggestions appreciated! :D






[nbusers] Adjusting What the List Displays

swifttarrow 06/27/2012

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 21 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close