I am fairly inexperienced with Java, but have done a good bit of programming. I wrote a complicated Mandelbrot Fractal Generator, but it is giving me some problems. I was writing it on a windows 7 computer, and whenever I clicked on the screen it was supposed to zoom in to the fractal at that position. The problem is that when I click on the screen it zooms in to the position I clicked, than zooms in again to the new position my mouse is at, in rapid succession, making it difficult to choose the location to zoom in to. I couldn't figure out why it was occurring so I had the drawing part of the program only work every other time it was called, which worked. Strangely, when I compiled and ran the program on my XP computer it didn't work with my fix, but did work with the original code.
Without seeing the code, we can't help you. It's probably an issue with how the two OS's are sending click events, however.
Attached is the code. Version 2 is the one that works on the XP computer. The only difference between them is that lines 141 and 148 are commented out. The code is really messy, I must apologize for that...
Ahh, troubleshooting platform independent code... Well, as far as I can tell MandelbrotTest2 works fine, except for that the drawing routines clear the window then place the new drawing which causes flashing each time I click somewhere. It's not terrible for an experiment, but I figure I should bring it up. MandelbrotTest alternates between an empty screen and a drawn screen, making it difficult to figure out where it's supposed to be, but I encountered no problems with rapid-succession zooming.
I'll look at it further and tell you if I notice anything.
Wow I changed my sig!
The flash you described in MandelbrotTest2 is not the error - And your description of Mandelbrot test is what it does when I run it on my XP computer. Meaning that your computer is working the same way my XP is. What operating system and versions of Java are you running?
Are you using the same JRE on both machines? MicroSoft has one, and Java has several versions. There's a chance this isn't a code issue, but an environment issue.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks