Search:

Type: Posts; User: dougie1809

Search: Search took 0.09 seconds.

  1. Replies
    18
    Views
    1,737

    Re: Logical Problem

    Ahh That worked perfectly, couldn't get my head around it, thanks alot for your patients.

    Appreciated
  2. Replies
    18
    Views
    1,737

    Re: Logical Problem

    Yes I've used that method many of times even in other various classes, but I still don't know how to apply that to any of my code
  3. Replies
    18
    Views
    1,737

    Re: Logical Problem

    I'm not to sure, I maybe thought that the index could be returned from the current object's index location, but I realized that wont work.

    See I'm pretty confused in my code.

    I create my...
  4. Replies
    18
    Views
    1,737

    Re: Logical Problem

    OK. I have now defined the 'questions' next to 'index' in the ListenerClass.

    I just now have created a getIndex(int index) method in the List class below:



    public int getIndex(int index)
    {...
  5. Replies
    18
    Views
    1,737

    Re: Logical Problem

    OK thanks. Hopefully this will be my last question.

    Yea I could increment index value for the next method call.
    Could I use a static variable, or maybe I could declare my Question List static? In...
  6. Replies
    18
    Views
    1,737

    Re: Logical Problem

    OK thanks.

    I understand on preserving the value outside the method, but how could I increment an object (Question in this case) where it is not an integer?

    Iv'e tried to modify the code to...
  7. Replies
    18
    Views
    1,737

    Re: Logical Problem

    Thanks for the reply.

    So I would declare a variable where I instantiate the Listener class, and within in an if clause? Or how would I go about doing so?

    Thanks
  8. Replies
    18
    Views
    1,737

    Re: Logical Problem

    After I hit the JButton 'hitMe',

    The program should print a Question object within the for loop on the JLabel 'questionLabel',
    Then I should be able to hit the JButton again which then the...
  9. Replies
    18
    Views
    1,737

    Re: Logical Problem

    Thanks for the reply. Sorry bad grammar.

    After I hit the JButton 'hitMe', I am trying to print each Question object on the 'questionLabel' JLabel during the for loop. But however it loops through...
  10. Replies
    18
    Views
    1,737

    Logical Problem

    Hi,

    The code below compiles without any errors. It's rather a logical problem. The actionPerformed method below loops through a list of Question objects ,While there is an element ahead using the...
Results 1 to 10 of 10