This content has been marked as final. Show 6 replies
Just to clarify, this bug started in Java 6 Update 10.
The version before this was Java 6 Update 7 which works fine. (there doesn't seem to be an update 8 or 9 in the archive).
no idea - just: did you try jdk7? There had been changes which may or not effect that glitch. Also, can you provide a SSCCE so that we can try to reproduce in our respective environments?1 person found this helpful
I've used every release from JRE 6 update 10 to JRE7 update 17.
But I finally found a "simple" workaround. I just repaint the JTextArea when up/down arrow is pressed. Good enough for me.
I will try and create a sample though, if it affects me someone else might find it too. But it's such an obscure intermittent bug it will be hard to trace.
Ok, I've created a small example that shows the bug.
Download, extract and execute run.bat
Works fine on my machines (recompiled for java 6u32 Windows 7 laptop and ran as-is on Java 7u17 windows 7 desktop). I jammed a great number of lines in there and I scrolled aimlessly with both mouse and keyboard, no problems.
So yeah... it shows the bug on your computer. Did you try on others? It just so happens that since Java 6 update 10, Swing has an accelerated drawing path through Direct3D which is enabled by default. What if you run the application with -Dsun.java2d.d3d=false, does the problem then go away? If so your video drivers must -really- suck.
Yup, adding -Dsun.java2d.d3d=false fixes the bug. It only happens on my laptop (tried 4 other systems - no problem on them).
I tried upgrading driver, no change.
Looks like the nVidia 8400M GS has a hardware glitch.
Using the -D is better than forcing a repaint(), so I'll use that. At least I know what the problem is.