I am writing a program in which I have done ALOT of coding already but there are still problems and features to be added.
So far my program:
1) Takes data from a .dat file and displays it on a table
2) There is a button for which you can add to the .dat file
Concerning the .dat file, it is organized into lines. Each line is data for a member....for example:
12345678Kenneth Wardman Westfirst High School 2007I12500
That is the first line of my data file..first 8 characters are the member #, next 20 is the member name, next 25 is the member school, next 4 is the year joined, next 1 is I/A for inactive/active, and the next 5 characters represent the $ owed. This pattern is inherent for all the lines of the .dat file
I have a function that successfully splits each line into sections and displays them in an organized fashion. I also have a function (as i said before) thats prompts the user for info and then adds the line to the .dat file in the above format.
What I have left to do is:
1) Make it so I can somehow change the member data (you'll see how i've organized things it in my code that i have attached)
2) Make it so that the table can "refresh" so i don't have to exit and then rerun the program in order to view the changes (the lines that I've added)
3) Get the button BELOW the table rather than covering the top part of the table (i stink at swing).
4) For some reason, my actionlistener doesnt function quite right. I wrote
source = event.getSource(); //event is the actionlistener parameter
if (source == addInfo) //addInfo is the name of my button
//at this point it says that addInfo is initialized or somthing...
This is in my code that is attached.
I have attached my .java files and the .dat file as .txt files. (just incase people are suspicious...)
model.txt -> copy and paste text into notepad and save as model.java
table.txt -> copy and paste text into notepad and save as table.java and put in same folder as model.java
nlc2008.txt -> copy and paste text into notepad and save as nlc2008.dat and put in the same folder (or whereever it needs to be for the file to be found by the program)
I really am in desperate need of expert advice....
Thanks in advance!
model.txt
table.txt
nlc2008.txt