Page 2 of 2 FirstFirst 12
Results 21 to 25 of 25
  1. #21
    samanyu is offline Member
    Join Date
    Jun 2011
    Location
    Tsukuba, Japan
    Posts
    63
    Rep Power
    0

    Default

    exactly, but when i do it, sometimes the first few columns do not get repainted. Why? What are your processor's specs? Speed?

  2. #22
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default

    I'm using XP on 1.8GHz single cpu

  3. #23
    samanyu is offline Member
    Join Date
    Jun 2011
    Location
    Tsukuba, Japan
    Posts
    63
    Rep Power
    0

    Default

    Dear Norm,
    here is the modification for the grid, just add this code fragment to the constructor in iteration2.

    for(int i=0; i<width; i++)
    {
    cells[i][16] = 1;
    }

    should do the trick. :) i think.

  4. #24
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default

    Nothing happens when I added it:
    Java Code:
        Iteration2( int w, int h){
           width = w;
           height = h;
           cells  = new int[w][h];
           buffer = new int[w][h];
           // Set some for debug
             for(int i=0; i<width; i++) {
                cells[i][16] = 1;
             }
             System.out.println("init done");
        }

  5. #25
    samanyu is offline Member
    Join Date
    Jun 2011
    Location
    Tsukuba, Japan
    Posts
    63
    Rep Power
    0

    Default

    Solved the problem, thanks for the help.
    You're one patient volunteer. Kudos.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. One row help with Locking Java to MAC Adress
    By Darkbound in forum New To Java
    Replies: 1
    Last Post: 04-28-2011, 08:42 PM
  2. Threading: Locking an object?
    By MatuX in forum Threads and Synchronization
    Replies: 12
    Last Post: 06-13-2010, 02:14 PM
  3. locking strategies
    By jicxicmic in forum JDBC
    Replies: 0
    Last Post: 09-04-2009, 12:36 AM
  4. Row level locking........
    By jithan in forum New To Java
    Replies: 0
    Last Post: 09-02-2008, 08:09 AM
  5. row level locking
    By jithan in forum New To Java
    Replies: 1
    Last Post: 08-28-2008, 07:42 PM

Tags for this Thread

Posting Permissions

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