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.

Views: 67

Reply to This

Happy 10th year, JCertif!

Notes

Welcome to Codetown!

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.

When you create a profile for yourself you get a personal page automatically. That's where you can be creative and do your own thing. People who want to get to know you will click on your name or picture and…
Continue

Created by Michael Levin Dec 18, 2008 at 6:56pm. Last updated by Michael Levin May 4, 2018.

Looking for Jobs or Staff?

Check out the Codetown Jobs group.

 

Enjoy the site? Support Codetown with your donation.



InfoQ Reading List

Article: Engineering Speed at Scale — Architectural Lessons from Sub-100-ms APIs

Sub‑100-ms APIs emerge from disciplined architecture using latency budgets, minimized hops, async fan‑out, layered caching, circuit breakers, and strong observability. But long‑term speed depends on culture, with teams owning p99, monitoring drift, managing thread pools, and treating performance as a shared, continuous responsibility.

By Saranya Vedagiri

Uber Moves from Static Limits to Priority-Aware Load Control for Distributed Storage

Uber engineers detailed how they evolved their storage platform from static rate limiting to a priority-aware load management system. The approach protects Docstore and Schemaless, Uber’s MySQL-based distributed databases, by colocating control with storage, prioritizing critical traffic, and dynamically shedding load under overload conditions.

By Leela Kumili

Building Software Organisations Where People Can Thrive

Continuous learning, adaptability, and strong support networks are the foundations for thriving teams, Matthew Card mentioned. Trust is built through consistent, fair leadership and addressing toxic behaviour, bias, and microaggressions early. By fostering growth, psychological safety, and accountability, people-first leadership drives resilience, collaboration, and performance.

By Ben Linders

Google DeepMind Introduces ATLAS Scaling Laws for Multilingual Language Models

Google DeepMind researchers have introduced ATLAS, a set of scaling laws for multilingual language models that formalize how model size, training data volume, and language mixtures interact as the number of supported languages increases.

By Robert Krzaczyński

Presentation: Foundation Models for Ranking: Challenges, Successes, and Lessons Learned

Moumita Bhattacharya discusses the evolution of Netflix’s ranking systems, from the multi-model architecture to a Unified Contextual Recommender (UniCoRn). She explains how they built a task-agnostic User Foundation Model to capture long-term member preferences. Learn how they solve system challenges like high-throughput inference and the tradeoff between relevance and personalization.

By Moumita Bhattacharya

© 2026   Created by Michael Levin.   Powered by

Badges  |  Report an Issue  |  Terms of Service