Need Help Reading files Posted: Feb 6, 2003 11:52 AM Reply
Making a applet that supposed to give a survey and store the results each time for my schools website too prove to help get a grant for our programming class which is currently being funded by the students, but I am having trouble for it to read the file using "readInt", also problems writing to the data file, Kinda on a timeframe on when the board needs to see it so please help so i don't have to pay 50$ a month to be in class!
public class SurveyTest extends Applet implements ActionListener { DataInputStream input; DataOutputStream output; Label surveyNameLabel = new Label ("NHS Parental Survey"); Label getToWorkLabel = new Label ("Please Ansewer the Questions to the Best of Your Ability");
Checkbox q1 = new Checkbox("q1"); int q1Total=0; Checkbox q2 = new Checkbox("q2"); int q2Total=0; Checkbox q3 = new Checkbox("q3"); int q3Total=0; Checkbox q4 = new Checkbox("q4"); int q4Total=0; Checkbox q5 = new Checkbox("q5"); int q5Total=0; Checkbox q6 = new Checkbox("q6"); int q6Total=0; Checkbox q7 = new Checkbox("q7"); int q7Total=0; Checkbox q8 = new Checkbox("q8"); int q8Total=0; Checkbox q9 = new Checkbox("q9"); int q9Total=0; Checkbox q10 = new Checkbox("q10"); int q10Total=0; Button submitButton = new Button("Submit Results"); int counter=0;
public void init() { setBackground(Color.cyan); add(surveyNameLabel); add(getToWorkLabel);