I previously asked this question on stack overflow. But have not received any responses that might help me. So I thought I would try here.
Essentially I am creating a Java application that reads and writes form a database. In the course of the design it creates new tables with new information as well as linking the information from those tables.
Anyway, the question is, the client has requested that the JTable that I use to display the Table names from the database now include 3 columns each with a checkbox. What would the best action be for me to store the data from these checkboxes?
Some of the methods I have considered are
- Store the information within the table in new columns (this will involve changing the code for modifying and writing of these tables, which is possible)
- Create a new table and store the other table names and the values in columns within (have it on load check the current names against the meta data and add/remove where needed)
- Create a properties file and pull the information from that, where it matches the names from the MetaData (ie. TableName=yes,no)
The option that strikes me as the easiest/fastest to do/run would be to go with option 3, and make a properties file.
NOTE: Within the application I already have methods for reading and writing from a properties file, as well as to create a new table within the database, and to write/read from the rows of each table.