Results 1 to 2 of 2
  1. #1
    cassysumandak is offline Member
    Join Date
    Mar 2009
    Posts
    38
    Rep Power
    0

    Default Controlling loop using next button

    Hi everyone,

    I have problem with displaying images on JPanel or JLabel.
    How can I control the loop using next button?

    Here is a part of the code.

    int m = 0;
    String [ ] a = {"drawing1", "drawing2", "drawing3", "drawing"};
    List<String> files = Arrays.asList(a);
    Collections.shuffle(files);


    //Loop function
    for (i=0; i<4; i++) {
    readInputFile(files, i); // method to display the image (code working fine)
    .......... (my problem is here- how can i control this loop using next button)
    }


    Thanks.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

Similar Threads

  1. Controlling loop using next button
    By cassysumandak in forum New To Java
    Replies: 25
    Last Post: 03-22-2009, 04:04 PM
  2. Replies: 1
    Last Post: 03-03-2009, 01:46 AM
  3. Controlling Page Scroll Position in Jsp....f there are fewer than 4 pages only that n
    By 82rathi.angara in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 07-05-2008, 03:11 PM
  4. Controlling method calls
    By bugger in forum New To Java
    Replies: 2
    Last Post: 01-04-2008, 02:14 PM
  5. controlling GC
    By ravian in forum Eclipse
    Replies: 2
    Last Post: 01-03-2008, 09:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •