Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Is Java 7 repaint() different than in Java 5?

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
I posted this in the Swing forum, but haven't gotten much help. Here is a link to the original post: https://coderanch.com/t/629000/GUI/java/repaint-automatically-erasing-circle

and here is a quote of my original post :

Ryan J McCormick wrote:On page 385 in Chapter 12 this code is shown to eliminate "smearing":



I had done all the previous code (in my own style) and found that the background rectangle was either being redrawn on its own, or there was something else removing the old circles from the screen. I then typed in the code from the previous page exactly as it was, to see if I had some change in syntax that would cause this, and it did the same thing.

Here's my code:


Is this because I'm using JRE7? I can't find any documentation that indicates the repaint() method has changed since Java 5.



I also did a screen record to show the problem that I'm seeing:
https://www.youtube.com/watch?v=-x048ZM4nFY


The reason I'm so persistent is that the new project, the music video one, is relying on the behavior.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Closing to keep all discussion in one place.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic