Knocked out some bugs
Tuesday, February 26th, 2008I found a good number of bugs in my code. Mostly they were things that I didn’t handle. For instance, I would have something return a null value that I wouldn’t account for when calling the method. I went back and fixed a lot of the code that was interfering with the TimeCardTableModel.
As of now, you can checkout my project and run the class EditPanel to see the JTable with the TimeCardTableModel displaying properly. Also the box will highlight red if the syntax of the data you are entering is incorrect. However, I was only able to get the Integer field for Break time to store the data. This is because of the way Java stores a date and time in one class, but I am keep the two values separate so that I can use a JXDatePicker.
I am thinking of either using a different date and time framework or using a Date/TimePicker, however the latter option seems to require buying a license for many of them, which would mean, if this is open-source, I couldn’t use them. I did research a way of using a JSpinner to account for the time, but I would need to figure out how to store two cells to the same Date object, one part being the date and the other being the time. I read that using a JXTable may cause problems because it resets the time to be midnight whenever someone changes the date.
I spent about 5 hours debugging and 2 hours researching.