JTables are not connected to files. You would have to write the code to connect a JTable to a file.
Type: Posts; User: Norm
JTables are not connected to files. You would have to write the code to connect a JTable to a file.
JTables are used when the program executes. Not for storing data between executions.
A JTable for what? I was talking about where to store the questions and answers so they would be easily read and updated.
My point was that reading a single file from a jar file would be easier than reading the contents of a folder in a jar file. As jps says, the other design would be more OOP. Which way is better for...
I've forgotten the coding used to read the contents of a folder in a jar file. For a disk folder, the File class's list() method does it.
Is that a bit harder in a jar file? No File class to do the work.
Separate files can be done, just a lot more work.
Could having separate files for each question be a maintenance problem?
How do you add more questions? How does the program find all the files it needs to read?
It can be done, but its more...
What's the easiest to program and the easiest to make changes to? I'd say put it all in one file.
A text file would be the simplest and could easily be included in a jar file.