hi guys im new here, looks like a good place to get some answers.
my problem is that i have a swing gui that takes a 4 numbered entry (code number) that represents a user. when entered, and a "retrieve" button is clicked, the details of the person with that code are displayed in the appropriate textfields. If the entry does not exist the user may add details and click the "add" button. hence, if the newly added code is re-entered the newly added details appear.
1)what is best to use to store and retrieve this information( ie: arrays?, vectors?, hashtable?) 2)can i have an example code to see this working. i can give you my code but it is over 600 lines and contains other functoin bits.
I think the best and easiest solution for this would be a database, especially if the number of users will be large. Look at the Sun tutorial for JDBC (there are plenty examples there): http://java.sun.com/docs/books/tutorial/jdbc/