This content has been marked as final. Show 6 replies
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.
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.