Search:

Type: Posts; User: miller4103

Search: Search took 0.07 seconds.

  1. Replies
    25
    Views
    3,070

    Re: Need looping help for my GUI.

    I understand that but that is what im having trouble with. I cannot find the correct logic for the loop i know im close but cannot find the one i need. The logic i have right now is working only...
  2. Replies
    25
    Views
    3,070

    Re: Need looping help for my GUI.

    Thats what i tried to do with the else statment but the else will not trigger for that to happen.


    btnPrevious.addActionListener(new ActionListener() {
    private int b = 4;

    ...
  3. Replies
    25
    Views
    3,070

    Re: Need looping help for my GUI.

    it shows 3,2,1,0 so its going thru all of them but then it throws an error of -1. like this:

    Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: -1
  4. Replies
    25
    Views
    3,070

    Re: Need looping help for my GUI.

    I fixed my next button with adding a i=0 to restart form the beggining when the else is activated.
    but now i cannot get my previous button else to activate when it reaches 0 it throws an error...
  5. Replies
    25
    Views
    3,070

    Re: Need looping help for my GUI.

    This is the code from beggining to end were it stops. After the last output it repeats that same output. What it should do after it reaches that last variable is go to the first one and repeat the...
  6. Replies
    25
    Views
    3,070

    Re: Need looping help for my GUI.

    their are 4 array's. The reason i ask is when i use the next button it doesnt matter which array im on it goes from the second integer to the first one then stops. That is hwy im asking.
  7. Replies
    25
    Views
    3,070

    Re: Need looping help for my GUI.

    Ok to do all of that i need to figure out how to get the code to know what loops its at right? ok lets get some pseudocode:
    if currentArray[] +1
    output
    else at end of array start at 0.

    so how...
  8. Replies
    25
    Views
    3,070

    Re: Need looping help for my GUI.

    Thank you. veriable b is not changing value and i dont know why. It is equal to my array[0]. I guess my logic is wrong. My next button seems to stop at my last array but how do i get an infinite loop...
  9. Replies
    25
    Views
    3,070

    Re: Need looping help for my GUI.

    can i get a short example to fully understand what you mean. I do understand but having trouble seeing how to implement this into my own code to use println as a debugger.
  10. Replies
    25
    Views
    3,070

    Re: Need looping help for my GUI.

    O ok. so the println should be inside the if statment to see if its doing what i need it to? if i get the println statment to work correclty i can just implement that into the gui code? That seems...
  11. Replies
    25
    Views
    3,070

    Re: Need looping help for my GUI.

    I dont know how to do that. i know how to add a println statment but thats it. How do i make one tell me whats wrong?
  12. Replies
    25
    Views
    3,070

    Re: Need looping help for my GUI.

    sorry about the bad formatting im still learning that. Also i know it doesnt compile i have class ink. If you are trying to get it to run i can post that code to. And the previous button should be...
  13. Replies
    25
    Views
    3,070

    Need looping help for my GUI.

    This is my code:


    import java.awt.*;
    import java.awt.event.*;
    import java.text.DecimalFormat;
    import javax.swing.*;


    public class Stapler extends Ink{
Results 1 to 13 of 13