Search:

Type: Posts; User: Hagstrom505

Search: Search took 0.19 seconds.

  1. Re: Counter behaving oddly, skipping large blocks of code& error message

    Ah.

    I do get what you're saying, and I agree that it would help, I'm just under a bit of a time constraint for this one. I need to have it completed by Thursday, and at this point, I'm just trying...
  2. Re: Counter behaving oddly, skipping large blocks of code& error message

    Ok, I converted it into something a little more manageable in the ide, and this is the error I get:

    Jan 28, 2013 7:53:36 PM org.jdesktop.application.Application$1 run
    SEVERE: Application class...
  3. Re: Counter behaving oddly, skipping large blocks of code& error message

    It's not, now that I've stripped it down. I am honestly trying, I don't know why this keeps happening.
  4. Re: Counter behaving oddly, skipping large blocks of code& error message

    Alright, that's fair.

    I'm going to trim it down to one button, the variables, and one section of the physical quiz. It comes in at around 145 lines, is that alright?


    Integer[]...
  5. Re: Counter behaving oddly, skipping large blocks of code& error message

    I'm sorry about all of that. However, mistakes happen, it was posted as a rush job sort of thing, and ignoring the dropped }, it runs fine when I execute it. All the generated code and extra methods...
  6. Re: Counter behaving oddly, skipping large blocks of code& error message

    *
    * SSCCEOfProblemView.java
    */

    package sscceofproblem;

    import org.jdesktop.application.Action;
    import org.jdesktop.application.ResourceMap;
    import...
  7. Re: Counter behaving oddly, skipping large blocks of code& error message

    Alright, how should I attach it?
  8. Re: Counter behaving oddly, skipping large blocks of code& error message

    I'm having a little trouble setting the SSCE up... Sorry.

    The offending code is as shown, I just copypasted it into the answer buttons, but the only other part of the code I think is missing are...
  9. Re: Counter behaving oddly, skipping large blocks of code& error message

    Um, bump?
  10. Re: Counter behaving oddly, skipping large blocks of code& error message

    AWT GUI. Input comes from buttons that when pressed, trigger a method which returns a numerical value that represents their answer. It also is the one responsible for cycling the questions.

    Should...
  11. Re: Counter behaving oddly, skipping large blocks of code& error message

    I think I've found something that might help. My code now looks like


    txta_display.setText("Press an answer button to begin");
    if (totalquestions==4){

    txta_display.setText("What is...
  12. Re: Counter behaving oddly, skipping large blocks of code& error message

    Ok, partially fixed that. It doesn't return the error message.

    However, it stays on the first display, rather than changing what's in the text area. The counter for totalquestions has a sudden...
  13. Counter behaving oddly, skipping large blocks of code& error message

    buttonPressA();
    buttonPressB();
    buttonPressC();
    buttonPressD();
    totalquestions=-1;//Don't ask why, it just works.
    answer=solutions[0];//Counter iterates once inexpicably,...
  14. Re: Help! Variable potentially getting Overwritten!

    Total questions isn't an issue. I already fixed that problem, it's in a different section of the code, so it wasn't part of the printout.




    System.out.println("answer:"+answer);
    ...
  15. Re: Help! Variable potentially getting Overwritten!

    Ok, I moved them. The answers match up with the solutions, but the score isn't being increased.
  16. Re: Help! Variable potentially getting Overwritten!

    Right, ran the System.out.printlns you suggested, and they didn't output anything.

    Any further suggestions?
  17. Re: Help! Variable potentially getting Overwritten!

    Integer, but my computers teacher says the opposite, if I'm reading you right.
  18. Re: Help! Variable potentially getting Overwritten!

    Zero is an okay response value, but this is when I run through the program using the correct answers, so all the if statements are considered true.

    Thanks though, will try that.
  19. Re: Help! Variable potentially getting Overwritten!

    Sorry about that. I declared it globally up at the beginning of the program.
    As for program's output, with several System.out.println statements I omitted from up above, I get the following output:...
  20. Help! Variable potentially getting Overwritten!

    I'm working on a school project, which is basically a quiz type program, but I've hit a bit of a snag...

    In it, I have a counter for the number of correct answers, but it doesn't store the value...
Results 1 to 20 of 20