JScrollPane not scrolling smoothly on fast computer

Posted by Knute... on 09. May 2015

I've got some software running at a client's place for almost 10 years.
It was running under Windows XP and I think must have been originally
compiled with Java 5 and then later Java 6. The program had been
running fine for years but the hardware is starting to give out. At one
site we upgraded to a modern desktop with Windows 7. We started
noticing some issues with JScrollPanes with lots of JComponents in them
not scrolling smoothly. The new computers were considerably more
powerful than their predecessors but the performance sucked. We were
forced to use Java 7 or new so we used 8 but were still not happy with
performance but couldn't figure out what to do about it.



Just this week we are preparing a new desktop to run some new software
and the old software as some systems are being combined and upgraded.
The old software that was running under XP on an older desktop now
started having the scrolling issues on the new computer. The new
computer is 4 core, lots of memory, much faster processor and running
Windows 8. This was driving everybody crazy so I started looking around
to see if I could find something that would fix it.



In the end, it turns out that Java 8 running on Windows 8 on this
computer was not using the OpenGL pipeline for 2D drawing. I don't
really understand how all that works but manually turning it on on the
command line fixed our sticky scrolling problem. Just add
-Dsun.java2d.opengl=True to the command line and it's back to normal.



If anybody knows anything about how the DirectDraw and OpenGL and all
this works or can point me to a good article about it on Java 8 I would
appreciate it greatly.



Hopefully this will help somebody with the same problem avoid all the
hassle and blame that their software is bad in the future.





Knute Johnson


13. May 2015: Re: get a list of classes at runtime by Eric ...

13. May 2015: Re: How to programatically limit the number of threads in a java by Joerg...

13. May 2015: Re: get a list of classes at runtime by e d p...

13. May 2015: Re: Puzzler: Fun with Streams. by Jeff ...

13. May 2015: Call for Papers: World Congress on Engineering and Computer Science WCECS 2015 by iaeng...

12. May 2015: Re: how does a marker interface give specific instruction to jvm(java internals) by Jeff ...

12. May 2015: Re: How to programatically limit the number of threads in a java by Marce...

12. May 2015: Re: JScrollPane not scrolling smoothly on fast computer by Knute...

12. May 2015: Re: how does a marker interface give specific instruction to jvm(java internals) by Jeff ...

12. May 2015: Puzzler: Fun with Streams. by Danie...

12. May 2015: Re: how does a marker interface give specific instruction to jvm(java internals) by Rober...

12. May 2015: Re: how does a marker interface give specific instruction to jvm(java internals) by ram a...

12. May 2015: Re: Use URL for HTTPS request using Proxy by Silvi...

12. May 2015: Use URL for HTTPS request using Proxy by Silvi...

12. May 2015: Re: what are the senarios when we should override equals and hashcode by Lew l...

12. May 2015: JNI Wrapper for Delphi and FreePascal version 2.8 by Ramin...

12. May 2015: Re: How to programatically limit the number of threads in a java by Eric ...

12. May 2015: Re: how does a marker interface give specific instruction to jvm(java internals) by Ajay ...

12. May 2015: How to programatically limit the number of threads in a java by Ajay ...

12. May 2015: Re: API vc MVC by Joerg...

12. May 2015: Need Java Developers/Tech Leads/Architects at Reston, VA (Permanent) by ashok...

11. May 2015: API vc MVC by Leona...

11. May 2015: Re: best and worst sorting algorithm for 1 to 10, 000 and then 10, 000 + elements by Eric ...

11. May 2015: Re: best and worst sorting algorithm for 1 to 10, 000 and then 10, 000 + elements by Gene ...

11. May 2015: Re: JScrollPane not scrolling smoothly on fast computer by e d p...

11. May 2015: Re: best and worst sorting algorithm for 1 to 10, 000 and then 10, 000 + elements by v_bor...

10. May 2015: Re: Animations with jTextPane by Knute...

10. May 2015: Re: how does a marker interface give specific instruction to jvm(java internals) by Joerg...

10. May 2015: Re: Animations with jTextPane by H L a...

10. May 2015: Re: Animations with jTextPane by Knute...

10. May 2015: Re: Animations with jTextPane by Knute...

10. May 2015: Re: Animations with jTextPane by H L a...

10. May 2015: Re: Animations with jTextPane by Knute...

10. May 2015: Re: how does a marker interface give specific instruction to jvm(java internals) by Jeff ...

10. May 2015: how does a marker interface give specific instruction to jvm(java internals) by Ajay ...

10. May 2015: Animations with jTextPane by H L a...

09. May 2015: JScrollPane not scrolling smoothly on fast computer by Knute...

09. May 2015: PEZZO DI MERDA BASTARDO DAVIDE SERRA DI ALGEBRIS INVESTMENTS - TWITTER, HA RICEVUTO INSIDER SULLE POPOLARI DAL MEGALAVA SOLDI MAFIOSI PIER LUIGI BOSCHI DI BANCA ETRURIA! SON TUTTI NAZISTI, TIPO NOTO VERME PAOLO BARRAI DI WMO, CHE SI FINGON DEL PD X.. by CARME...

09. May 2015: Re: best and worst sorting algorithm for 1 to 10, 000 and then 10, 000 + elements by Eric ...

08. May 2015: Re: best and worst sorting algorithm for 1 to 10, 000 and then 10, 000 + elements by ram a...

08. May 2015: How to read the Java tutorial offline? by ram a...

08. May 2015: Re: best and worst sorting algorithm for 1 to 10,000 and then 10,000 + elements by Marti...

08. May 2015: Re: How to read the Java tutorial offline? by Jeff ...

06. May 2015: Re: Why Islam is the true religion of God. by Danci...

06. May 2015: CCC: CIUCCIA CAZZI DI CAVALLO PAOLO BARRAI DI CRIMINALI WMO E BSI ITALIA SRL, UNA VOLTA CACCIATO (E FATTO CONDANNARE AL CARCERE) DA CITIBANK, PRIMA DI SPENNARE POLLI NEL WEB, FECE FILM PEDOPORNOMOSESSUALI! E CON CAVALLI! CIUCCIANDO CAZZI EQUINI E ... by CHE S...

05. May 2015: Why Islam is the true religion of God. by BV BV...

04. May 2015: Re: best and worst sorting algorithm for 1 to 10, 000 and then 10, 000 + elements by Marce...

04. May 2015: Re: best and worst sorting algorithm for 1 to 10, 000 and then 10, 000 + elements by Eric ...

04. May 2015: Re: best and worst sorting algorithm for 1 to 10, 000 and then 10, 000 + elements by Eric ...

04. May 2015: best and worst sorting algorithm for 1 to 10, 000 and then 10, 000 + elements by Ajay ...

03. May 2015: Re: What is your favorite WC++IETJ? by Joshu...

03. May 2015: Re: what are the senarios when we should override equals and hashcode by Arne ...

03. May 2015: NAZIPEDERASTA SODOMIZZA BAMBINI: PAOLO BARRAI DI CRIMINALI WMO E BSI ITALIA SRL VIA SOCRATE 26 MILANO (OLTRE CHE MEGALAVA CASH MAFIOSO E POLITI-CRIMINALI)! STALKA A MORTE CHI LO FOTOGRAFA E SE "1 INSISTE", KILLER PAOLO BARRAI FA "SUICIDARE" DAVVERO!! by CARME...

03. May 2015: Re: what are the senarios when we should override equals and hashcode by ram a...

02. May 2015: what are the senarios when we should override equals and hashcode by Ajay ...

02. May 2015: imported maven project can't be recognized as java in eclipse by Ajay ...

02. May 2015: Re: Good example of EJB interface for CRUD operations by pavel...

01. May 2015: Very urgent requirement || Technical Lead - .Net @ Golden Valley, MN by Vasan...

01. May 2015: Re: If java doesn't support operator overloading, how does String + concatenation work by v_bor...

30. Apr 2015: Re: If java doesn't support operator overloading, how does String + concatenation work by Rober...

30. Apr 2015: Re: What is your favorite WC++IETJ? by Robbi...

30. Apr 2015: Re: What is your favorite WC++IETJ? by Sebas...

30. Apr 2015: Re: What is your favorite WC++IETJ? by ram a...

30. Apr 2015: Re: What is your favorite WC++IETJ? by ram a...

30. Apr 2015: Re: What is your favorite WC++IETJ? by Jerry...

30. Apr 2015: What is your favorite WC++IETJ? by ram a...

30. Apr 2015: Re: If java doesn't support operator overloading, how does String + concatenation work by Eric ...

30. Apr 2015: Re: What is your favorite WC++IETJ? by Eric ...

30. Apr 2015: Re: Easy exhaustive search with Java 8 Streams by j4n b...

30. Apr 2015: If java doesn't support operator overloading, how does String + concatenation work by Ajay ...

29. Apr 2015: Re: Easy exhaustive search with Java 8 Streams by Sebas...

29. Apr 2015: Re: Easy exhaustive search with Java 8 Streams by Sebas...

29. Apr 2015: Re: Survey Request for Research related to Software Engineering and Social Media by Jerry...

29. Apr 2015: Survey Request for Research related to Software Engineering and Social Media by Augus...

29. Apr 2015: Re: Cannot seem to lock HashMap by pww19...

28. Apr 2015: Re: Easy exhaustive search with Java 8 Streams by ram a...

28. Apr 2015: Re: Easy exhaustive search with Java 8 Streams by Jan B...

27. Apr 2015: Re: Good example of EJB interface for CRUD operations by Rober...

27. Apr 2015: Easy exhaustive search with Java 8 Streams by Sebas...

27. Apr 2015: Re: Good example of EJB interface for CRUD operations by pavel...

27. Apr 2015: Good example of EJB interface for CRUD operations by pavel...

25. Apr 2015: Re: enum, what is it good for? by Rober...

24. Apr 2015: Re: enum, what is it good for? by Sebas...

24. Apr 2015: Re: enum, what is it good for? by Rober...

22. Apr 2015: Javascript advance by sheik...

22. Apr 2015: What is Armstrong number? Learn about Armstrong Number by sheik...

22. Apr 2015: Re: FileChooser on 2K Displays by j4n b...

22. Apr 2015: FileChooser on 2K Displays by j4n b...

22. Apr 2015: Re: how to hide and show cursor in JTextField? by Eric ...

22. Apr 2015: Re: how to hide and show cursor in JTextField? by karth...

21. Apr 2015: Re: enum, what is it good for? by Kevin...

21. Apr 2015: Re: runnable jar by Arne ...

21. Apr 2015: Re: C++ hash function -> Java by pww19...

21. Apr 2015: Re: Abuse of AssertionError? by Thoma...

21. Apr 2015: Re: Abuse of AssertionError? by j4n b...

21. Apr 2015: runnable jar by cebi ...

21. Apr 2015: Re: Abuse of AssertionError? by Jerry...

21. Apr 2015: Re: Abuse of AssertionError? by Eric ...

21. Apr 2015: Re: Abuse of AssertionError? by Eric ...

21. Apr 2015: Re: Abuse of AssertionError? by Jerry...