Results 1 to 5 of 5
  1. #1
    tzeus is offline Member
    Join Date
    Dec 2013
    Posts
    20
    Rep Power
    0

    Default Image splitting twice

    Hello,
    I am building a puzzle game for a school project and i encountered a weird issue.
    The puzzle should first display all the images in the present folder, and when an image is clicked will split that image in 16 different chunks, and display them(repaint the JPanel).
    The problem is that, when i click an image, is splits a chunk in smaller chunks and displays them.
    So, if i have img1. in the folder, if i click on it it will split it in 16 chunks, then 1 chunk from those will be split again in 16 chunks and those will be displayed.
    It is kind of hard to explain but i have attached a copy of the project(eclipse).
    Can anyone explain why is this happening?
    Thank you
    Attached Files Attached Files
    Last edited by tzeus; 12-08-2013 at 11:46 PM.

  2. #2
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    4,036
    Rep Power
    6

    Default Re: Image splitting twice

    No attachment provided. But if it isn't too large, please post your code (no attachments please).

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  3. #3
    tzeus is offline Member
    Join Date
    Dec 2013
    Posts
    20
    Rep Power
    0

    Default Re: Image splitting twice

    I was trying to attach a rar file, which is invalid.

  4. #4
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Location
    Northern Virginia, United States
    Posts
    4,036
    Rep Power
    6

    Default Re: Image splitting twice

    Can you provide a smaller version that can be posted as code in the message that demonstrates the problem? For example, simply jumbling an image should not take too much code.

    Regards,
    Jim
    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  5. #5
    tzeus is offline Member
    Join Date
    Dec 2013
    Posts
    20
    Rep Power
    0

    Default Re: Image splitting twice

    Hello, i guess there was nothing wrong with my code, once i replaced the original images, the code worked as it was supposed to be. I guess it was an Eclipse bug, or something in the lines of "cache", or temp files. i.e. when u access a webpage but it is already cached and it fails to display the correct changes. The same think was happening to my code. Thank you all! The thread can now be closed.

Similar Threads

  1. splitting strings.
    By Bimz in forum New To Java
    Replies: 3
    Last Post: 09-13-2011, 03:07 PM
  2. Splitting number
    By cshoya in forum New To Java
    Replies: 2
    Last Post: 06-06-2011, 04:23 AM
  3. Splitting
    By marksey07 in forum New To Java
    Replies: 2
    Last Post: 01-05-2011, 02:55 AM
  4. Sending and splitting an image file over tcp socket.
    By busdude in forum Advanced Java
    Replies: 1
    Last Post: 12-02-2010, 11:03 AM
  5. Array splitting
    By Lunarion in forum New To Java
    Replies: 3
    Last Post: 04-17-2009, 09:00 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
  •