Monday, 10 February 2014

NullPointer

So I've run into an error with adding the things into the JPanel. I wanted to do it using a loop so that if I ever change it then I wouldn't have to worry about it, but I'm not sure how to do it without going "outside of the loop." I'm thinking that if i == 7, then to make it equal to 0, but that's not the effect I am trying to achieve either.

I've also changed the arrangement to something like this:



Place of StayJTextField (empty)
Name of Accommodation JTextField (empty)
Date of Stay JTextField (empty)
Type of Accommodation JTextField (empty) 
Price per person JTextField (empty)
Other Info JTextField (empty)

Clear Fields
CONTINUE

Rather than the previous one, where you had to enter month and date separately. Seems redundant. but in that case I gotta edit the class and the text file and all. So for the date, they can just enter something like "August 1" or something like that. It'll make it a lot easier - maybe not for sorting, but I can assign each month a value and then sort it that way rather than alphabetical because that just won't work, haha.

And then I just ran into another error..all that code and nothing is showing up. 

No comments:

Post a Comment