Codetown ::: a software developer's community
Hello all, I am “very” new to Java and fairly new to programming in general. I have been reading the “Head First Java” book and while doing one of the examples came across an observation. I created a colored circle and a button when you click the button the circle changes to a random color with the repaint() method. I have dual monitors set up and what I noticed was that If I were to drag the window to the second monitor it fires the repaint() method. Can anyone explain why this happens? I know this is probably something as a new programmer I don’t need to know right now but it did intrigue me so I thought I would ask.
Tags:
Codetown is a social network. It's got blogs, forums, groups, personal pages and more! You might think of Codetown as a funky camper van with lots of compartments for your stuff and a great multimedia system, too! Best of all, Codetown has room for all of your friends.
Created by Michael Levin Dec 18, 2008 at 6:56pm. Last updated by Michael Levin May 4, 2018.
Check out the Codetown Jobs group.

There was a flurry of activity in the Spring ecosystem during the week of April 20th, 2026, highlighting the first release candidates of: Spring Boot, Spring Security, Spring Integration, Spring Modulith, Spring AMQP, Spring for Apache Kafka and Spring Vault.
By Michael Redlich
AWS has recently announced that WorkMail will be discontinued and that App Runner will stop accepting new customers and move into maintenance mode. Several other less popular services and features are also entering maintenance or sunset phases, triggering concern and debate across the AWS community.
By Renato Losio
Cloudflare recently introduced its Gen 13 servers, marking a shift in how its network handles traffic. Instead of relying on large CPU caches for speed, the company redesigned its software to leverage many more processor cores working in parallel in its latest AMD-based servers.
By Renato Losio
Yelp has completed a large-scale upgrade of its Apache Cassandra infrastructure, spanning more than 1,000 nodes, without any service downtime, offering a blueprint for managing stateful systems at scale.
By Craig Risi
Shuman Ghosemajumder explains how generative AI has transformed from a creative curiosity into a high-scale tool for disinformation and fraud. He shares insights on "Disinformation Automation," the fallacy of CAPTCHA in an AI world, and why engineering leaders must adopt zero-trust "cyber fusion" strategies to defend against automated attacks that mimic human behavior with chilling accuracy.
By Shuman Ghosemajumder
© 2026 Created by Michael Levin.
Powered by